Skip to content

Instantly share code, notes, and snippets.

@who
Last active August 29, 2015 14:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save who/2ad48a523ce91b646ba7 to your computer and use it in GitHub Desktop.
Save who/2ad48a523ce91b646ba7 to your computer and use it in GitHub Desktop.
{
"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