Skip to content

Instantly share code, notes, and snippets.

@who
Last active Aug 29, 2015
Embed
What would you like to do?
{
"swagger": "2.0",
"info": {
"version": "0.0.0",
"title": "Simple API"
},
"paths": {
"/": {
"get": {
"operationId":"repro",
"responses": {
"200": {
"description": "OK",
"schema" : {
"$ref": "#/definitions/SuperObject"
}
}
}
}
}
},
"definitions" : {
"SuperObject": {
"type": "object",
"properties": {
"thingType": {
"type": "string",
"enum": [
"FOO",
"BAR"
]
}
}
},
"SubObject": {
"allOf": [
{
"$ref": "#/definitions/SuperObject"
},
{
"type": "object",
"properties": {
"thingType": {
"type": "string",
"enum": [
"FOO",
"BAR"
]
},
"anotherProperty": {
"type": "string"
}
}
}
]
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment