Last active
August 29, 2015 14:14
-
-
Save Rio517/7db9a058b2bb7bd078ce to your computer and use it in GitHub Desktop.
api-sample-doc
This file contains 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
{ | |
"swagger": "2.0", | |
"info": { | |
"version": "0.0.1", | |
"title": "MAYDAY" | |
}, | |
"paths": { | |
"/stats": { | |
"get": { | |
"description": "returns list of global stats\n", | |
"responses": { | |
"200": { | |
"description": "Successful response", | |
"schema": { | |
"title": "ArrayOfCounts", | |
"type": "object", | |
"properties": { | |
"retrieved_at": { | |
"type": "string" | |
}, | |
"count_of_something": { | |
"type": "integer" | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/persons": { | |
"post": { | |
"description": "creates a new person", | |
"parameters": [ | |
{ | |
"name": "first_name", | |
"description": "first name", | |
"in": "query", | |
"type": "string", | |
"required": false, | |
"format": "double" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Successful response" | |
} | |
} | |
}, | |
"get": { | |
"description": "Gets a list of 20 most recent `Person` objects.\n", | |
"parameters": [ | |
{ | |
"name": "size", | |
"in": "query", | |
"description": "Size of result", | |
"required": true, | |
"type": "number", | |
"format": "double" | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Successful response", | |
"schema": { | |
"title": "ArrayOfPersons", | |
"type": "array", | |
"items": { | |
"title": "Person", | |
"type": "object", | |
"properties": { | |
"name": { | |
"type": "string" | |
}, | |
"single": { | |
"type": "boolean" | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment