Skip to content

Instantly share code, notes, and snippets.

@Rio517
Last active August 29, 2015 14:14
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 Rio517/7db9a058b2bb7bd078ce to your computer and use it in GitHub Desktop.
Save Rio517/7db9a058b2bb7bd078ce to your computer and use it in GitHub Desktop.
api-sample-doc
{
"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