response multi data model
See original GitHub issuei want to use to multi data model in response
according to spec ‘OpenAPI 3.0 provides several keywords which you can use to combine schemas’ oneOf that is keyword is used to combine schemas but OpenAPI doesn`t recognized multi data model
my openAPI code – paths: /pets: patch: requestBody: content: application/json: schema: oneOf: - $ref: ‘#/components/schemas/Cat’ - $ref: ‘#/components/schemas/Dog’ responses: ‘404’: description: not found content: application/json: schema: oneOf: - $ref: ‘#/components/schemas/Cat’ - $ref: ‘#/components/schemas/Dog’ components: schemas: Dog: type: object properties: bark: type: boolean breed: type: string enum: [Dingo, Husky, Retriever, Shepherd] Cat: type: object properties: hunts: type: boolean age: type: integer
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (3 by maintainers)
Top GitHub Comments
Thanks @shockey
@vickysg0210 with which tool(s)? I see you have already commented on https://github.com/swagger-api/swagger-ui/issues/3803