Describe the bug
When generating server stubs from TimeAddressableMediaStore.yaml using openapitools/openapi-generator-cli, three schemas produce duplicate model pairs: FlowSegment / FlowSegment1, FlowSegmentPost / FlowSegmentPost1, and DeletionRequest / DeletionRequest1. Both models in each pair are structurally identical. A developer implementing the server traits has no clear basis for choosing between them.
Expected behavior
Each schema should produce a single, consistently named model.
Suggested fix
Register each schema once in components/schemas in the root YAML and replace all direct $ref: schemas/<file>.json usage sites with $ref: '#/components/schemas/<Name>'. The generator deduplicates schemas keyed on their components/schemas path, so all references to the same entry resolve to one model.
Additional context
The root cause is that the same external schema file is referenced at multiple distinct YAML paths. The generator resolves each path independently and treats them as separate schemas. This is a spec convention issue rather than a generator bug — using components/schemas is the intended OpenAPI pattern for shared, reusable schemas.
Describe the bug
When generating server stubs from
TimeAddressableMediaStore.yamlusingopenapitools/openapi-generator-cli, three schemas produce duplicate model pairs:FlowSegment/FlowSegment1,FlowSegmentPost/FlowSegmentPost1, andDeletionRequest/DeletionRequest1. Both models in each pair are structurally identical. A developer implementing the server traits has no clear basis for choosing between them.Expected behavior
Each schema should produce a single, consistently named model.
Suggested fix
Register each schema once in
components/schemasin the root YAML and replace all direct$ref: schemas/<file>.jsonusage sites with$ref: '#/components/schemas/<Name>'. The generator deduplicates schemas keyed on theircomponents/schemaspath, so all references to the same entry resolve to one model.Additional context
The root cause is that the same external schema file is referenced at multiple distinct YAML paths. The generator resolves each path independently and treats them as separate schemas. This is a spec convention issue rather than a generator bug — using
components/schemasis the intended OpenAPI pattern for shared, reusable schemas.