Support inheritence in openapi
medcelerate opened this issue · 1 comments
medcelerate commented
Is your feature request related to a problem? Please describe.
In typescript you can extend and interface, but when compiling to open api it duplicates the fields rather then inheriting from another definition.
Describe the solution you'd like
Ideally support the allof mechanism included in the openapi spec or have a flag to allow this to happen.
Describe alternatives you've considered
We have considered writing our own codegen pipeline but the documentation doesn't seem clear on how to properly develop generators.
Additional context
Below is the open api method.
ExtendedErrorModel:
allOf: # Combines the BasicErrorModel and the inline model
- $ref: '#/components/schemas/BasicErrorModel'
- type: object
required:
- rootCause
properties:
rootCause:
type: string