Created
January 31, 2019 21:02
-
-
Save matt212/7dd0906bb6a3734a9e3bcc6342b22f49 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"openapi": "3.0.0", | |
"info": { | |
"description": "This is a sample server Petstore server.", | |
"version": "1.0.0", | |
"title": "Swagger Petstore", | |
"termsOfService": "http://swagger.io/terms/", | |
"contact": { | |
"email": "[email protected]" | |
}, | |
"license": { | |
"name": "Apache 2.0", | |
"url": "http://www.apache.org/licenses/LICENSE-2.0.html" | |
} | |
}, | |
"paths": { | |
"/pets": { | |
"patch": { | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"oneOf": [ | |
{ | |
"$ref": "#/components/schemas/Cat" | |
}, | |
{ | |
"$ref": "#/components/schemas/Dog" | |
} | |
] | |
} | |
} | |
} | |
}, | |
"responses": { | |
"200": { | |
"description": "Updated" | |
} | |
} | |
} | |
} | |
}, | |
"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" | |
} | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment