Last active
August 29, 2015 14:08
-
-
Save chmac/43bf148f476496b79207 to your computer and use it in GitHub Desktop.
heroku-pets.yaml JSONified
This file contains hidden or 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": "1.0.0", | |
"title": "PetStore on Heroku" | |
}, | |
"host": "petstore-api.herokuapp.com", | |
"basePath": "/pet", | |
"paths": { | |
"/": { | |
"get": { | |
"responses": { | |
"200": { | |
"description": "List all pets" | |
} | |
} | |
}, | |
"post": { | |
"parameters": [ | |
{ | |
"name": "pet", | |
"in": "body", | |
"description": "The pet JSON you want to post", | |
"schema": { | |
"$ref": "#/definitions/Pet" | |
}, | |
"required": true | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Make a new pet" | |
} | |
} | |
}, | |
"put": { | |
"parameters": [ | |
{ | |
"name": "pet", | |
"in": "body", | |
"description": "The pet JSON you want to post", | |
"schema": { | |
"$ref": "#/definitions/Pet" | |
}, | |
"required": true | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Updates the pet" | |
} | |
} | |
} | |
}, | |
"/{petId}": { | |
"get": { | |
"parameters": [ | |
{ | |
"name": "petId", | |
"type": "string", | |
"in": "path", | |
"description": "ID of the pet", | |
"required": true | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Sends the pet with pet Id" | |
} | |
} | |
} | |
} | |
}, | |
"definitions": { | |
"Pet": { | |
"properties": { | |
"name": { | |
"type": "string" | |
}, | |
"birthday": { | |
"type": "integer", | |
"format": "int32" | |
}, | |
"phone": { | |
"$ref": "Phone" | |
}, | |
"owner": { | |
"$ref": "Owner" | |
} | |
}, | |
"required": [ | |
"name", | |
"birthday", | |
"species" | |
] | |
}, | |
"Phone": { | |
"properties": { | |
"code": { | |
"type": "string" | |
}, | |
"number": { | |
"type": "string" | |
} | |
} | |
}, | |
"Owner": { | |
"properties": { | |
"name": { | |
"type": "string" | |
}, | |
"phone": { | |
"$ref": "Phone" | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment