Wrong model titles when composing using allOf
See original GitHub issueWhen composing models using allOf, swagger-ui displays wrong model title for composed model. It uses last model referenced in allOf instead of one defined.
Definition:
definitions:
Simple1:
type: object
properties:
id1:
type: integer
format: int64
Simple2:
type: object
properties:
id2:
type: integer
format: int64
Composed:
allOf:
- $ref: '#/definitions/Simple1'
- $ref: '#/definitions/Simple2'
Expected result:
Simple1{...}
Simple2{...}
Composed{...}
Actual result:
Simple1{...}
Simple2{...}
Simple2{...}
Affected version: v3.0.0-229-g7790383
Issue Analytics
- State:
- Created 6 years ago
- Reactions:11
- Comments:21 (9 by maintainers)
Top Results From Across the Web
Open API generator allOf not generating model correctly
I want to generate our models based on an Openapi spec 3.0 yml definition. In my spec I have a definition using allOf...
Read more >Inheritance and Polymorphism - Swagger
Model Composition. In your API, you may have model schemas that share common properties. ... In OpenAPI version 3, you do this with...
Read more >Understanding JSON Schema 2020-12 documentation
JSON Schema includes a few keywords for combining schemas together. Note that this doesn't necessarily mean combining schemas from multiple files or JSON ......
Read more >How to write Swagger documentation for Laravel API. Tips ...
Let's create a User object. I prefer adding that in Model class. /** * * @OA\Schema( * required={"password"},
Read more >Strict Type Validation With Pydantic - Section.io
Objects in Pydantic are defined using models. A model class inherits from the BaseModel class. All of the fields and custom validation logic ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I have encountered the same problem, how is the progress?
Tip : add composition value with the model title :
=>