Summary
Set up shared OpenAPI schemas and per-plugin spec management so that plugins can define their own API paths and entity-specific schemas while sharing common types like BaseResource, BaseResourceList, and MetadataValue.
Motivation
Every catalog plugin has entities that share a common shape: id, name, externalId, description, customProperties, and timestamps. Without a shared schema definition, each plugin would duplicate these fields, leading to drift and inconsistency. At the same time, each plugin needs autonomy over its own paths and entity-specific schemas.
Scope
- Create a shared
common.yaml library at the repository root defining BaseResource, BaseResourceList, MetadataValue, and other common types
- Define a split-file structure within each plugin:
openapi.yaml for paths + components.yaml for schemas
- Build a merge script that combines all plugin specs into a unified specification
- Integrate the merge step into the existing
make gen pipeline
Acceptance Criteria
Dependencies
References
Summary
Set up shared OpenAPI schemas and per-plugin spec management so that plugins can define their own API paths and entity-specific schemas while sharing common types like
BaseResource,BaseResourceList, andMetadataValue.Motivation
Every catalog plugin has entities that share a common shape:
id,name,externalId,description,customProperties, and timestamps. Without a shared schema definition, each plugin would duplicate these fields, leading to drift and inconsistency. At the same time, each plugin needs autonomy over its own paths and entity-specific schemas.Scope
common.yamllibrary at the repository root definingBaseResource,BaseResourceList,MetadataValue, and other common typesopenapi.yamlfor paths +components.yamlfor schemasmake genpipelineAcceptance Criteria
common.yamldefines shared types (BaseResource,BaseResourceList,MetadataValue, etc.)openapi.yaml(paths) andcomponents.yaml(schemas) referencing common typesmake openapi/validatepasses on the merged outputmake gen/openapi,make gen/openapi-server) works with the new structuremake build && make test && make lintpassDependencies
References