-
Notifications
You must be signed in to change notification settings - Fork 9.1k
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
response multi data model #1406
Comments
Your definition appears to be valid (excepting the missing
are you referring to a particular tool? If so, you should raise the issue on the appropriate repository, this repository is for the OpenAPI specification itself only. |
Facing the same issue as well |
@vickysg0210 with which tool(s)? I see you have already commented on swagger-api/swagger-ui#3803 |
im using online swagger-editor |
@MikeRalphson, I think this can be closed, sounds like it's on us over at Swagger-UI 😄 |
Thanks @shockey |
i 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
The text was updated successfully, but these errors were encountered: