Skip to content

Instantly share code, notes, and snippets.

@earth2marsh
Last active August 29, 2015 14:05
Show Gist options
  • Save earth2marsh/24f433d6b60ddf26a542 to your computer and use it in GitHub Desktop.
Save earth2marsh/24f433d6b60ddf26a542 to your computer and use it in GitHub Desktop.
Simple JSON example for samples
{
"responses": {
"200": {
"description": "pet response",
"schema": {
"$ref": "Pet"
},
"examples": {
"sample": {
"request": 'GET /api/pet/1 HTTP/1.1\nHost: petstore.swagger.wordnik.com\nAccept: application/json\nContent-Type: application/json',
"response": 'HTTP/1.1 200 OK\nDate: Fri, 22 Aug 2014 19:18:46 GMT\nContent-Type: application/json\n{"id":1,"category":{"name":""},"name":"","photoUrls":[""],"tags":[{"name":""}],"status":""}'
}
}
},
"default": {
"description": "error payload",
"schema": {
"$ref": "ErrorModel"
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment