Skip to content

Instantly share code, notes, and snippets.

@sigues
Created January 11, 2016 06:05
Show Gist options
  • Save sigues/f92f3aa927046ce07018 to your computer and use it in GitHub Desktop.
Save sigues/f92f3aa927046ce07018 to your computer and use it in GitHub Desktop.
swagger: '2.0'
info:
version: 1.0.0
title: PetStore on Heroku
description: >
**This example has a working backend hosted in Heroku**
You can try all HTTP operation described in this Swagger spec.
Find source code of this API [here](https://github.com/mohsen1/petstore-api)
host: frozen-meadow-5318.herokuapp.com
basePath: /api/v1
schemes:
- https
consumes:
- application/json
- text/xml
produces:
- application/json
- text/html
paths:
/User:
get:
parameters:
- name: users
in: query
description: number of users to return
type: integer
default: 11
minimum: 11
maximum: 10000
- name: token
in: query
description: authenticated user token
type: string
responses:
'200':
description: List all users
schema:
title: Users
type: array
items:
$ref: '#/definitions/Pet'
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
in: path
type: string
description: ID of the pet
required: true
responses:
'200':
description: Sends the pet with pet Id
definitions:
Pet:
type: object
properties:
name:
type: string
birthday:
type: integer
format: int32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment