Skip to content

Instantly share code, notes, and snippets.

@bhaskarmelkani
Last active April 12, 2017 08:53
Show Gist options
  • Save bhaskarmelkani/d1781a848e88747039ff7e56d287db18 to your computer and use it in GitHub Desktop.
Save bhaskarmelkani/d1781a848e88747039ff7e56d287db18 to your computer and use it in GitHub Desktop.
---
swagger: "2.0"
info:
version: "1.0.0"
title: "Swagger Petstore"
description: "A sample API that uses a petstore as an example to demonstrate features in the swagger-2.0 specification"
termsOfService: "http://swagger.io/terms/"
contact:
name: "Swagger API Team"
license:
name: "MIT"
host: "petstore.swagger.io"
basePath: "/api"
securityDefinitions:
oauth:
type: oauth2
tokenUrl: https://example.com/authorize
flow: password
scopes:
scope.read: read access
scope.write: write access
security:
- oauth: [scope.read, scope.write]
schemes:
- "http"
consumes:
- "application/json"
produces:
- "application/json"
paths:
/pets:
get:
description: "Returns all pets from the system that the user has access to"
produces:
- "application/json"
responses:
"200":
description: "A list of pets."
schema:
type: "object"
properties:
$ref: "#/definitions/Pet"
definitions:
Pet:
type: "object"
required:
- "id"
- "name"
properties:
id:
type: "string"
name:
type: "string"
tag:
type: "string"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment