-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
allOf is not appearing properly in generated schema #3197
Comments
Same issue faced by me too |
Closed
frantuma
added a commit
that referenced
this issue
Jul 31, 2019
frantuma
added a commit
that referenced
this issue
Jul 31, 2019
refs #3197 - resolve properties within allOf for composed schemas
This was referenced Jul 31, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am using io.swagger.core.v3 2.0.8 to generate OpenAPI Schema. I am using inheritance with polymorphism to define my models. When I generate the schema, subtype models are not generated properly.
allOf
should have model definition as child of it (inline) but in my schemaallOf
and rest of the subtype schema are siblings. Which breaks generation of client, particularly properties are not generated.For example,
my subtype
RaceCar
looks like:RaceCar: required: - carMetaData type: object properties: id: type: integer format: int64 model: type: string allOf: - $ref: '#/components/schemas/Car'
which has
allOf
,type
andproperties
as siblings.It supposed to be:
RaceCar: allOf: - $ref: '#/components/schemas/Car' - type: object required: - id properties: id: type: integer format: int64 model: type: string x-translation: - model
Complete Example
My java models
Actual generated schema
Expected schema
The text was updated successfully, but these errors were encountered: