{
  "swagger": "2.0",
  "info": {
    "version": "1.0.9-abcd",
    "title": "Swagger Sample API",
    "description": "A sample API that uses a petstore as an example to demonstrate features in the swagger-2.0 specification",
    "termsOfService": "http://helloreverb.com/terms/",
    "contact": {
      "name": "wordnik api team",
      "url": "http://developer.wordnik.com"
    },
    "license": {
      "name": "Creative Commons 4.0 International",
      "url": "http://creativecommons.org/licenses/by/4.0/"
    }
  },
  "host": "my.api.com",
  "basePath": "/v1",
  "schemes": [
    "http",
    "https"
  ],
  "consumes": [
    "application/json"
  ],
  "produces": [
    "application/json",
    "application/xml"
  ],
  "paths": {
    "/pets/{id}": {
      "get": {
        "description": "Returns pets based on ID",
        "summary": "Find pets by ID",
        "operationId": "getPetsById",
        "parameters": [
          { "$ref": "#/parameters/skipParam" },
          { "$ref": "#/parameters/limitParam" }
        ],
        "responses": {
          "200": {
            "description": "pet response",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "Pet"
              }
            }
          },
          "default": {
            "description": "error payload",
            "schema": {
              "$ref": "ErrorModel"
            }
          }
        }
      }
    }
  },
  "parameters": {
    "skipParam": {
      "name": "skip",
      "in": "query",
      "description": "number of items to skip",
      "required": true,
      "type": "integer",
      "format": "int32"
    },
    "limitParam": {
      "name": "limit",
      "in": "query",
      "description": "max records to return",
      "required": true,
      "type": "integer",
      "format": "int32"
    }
  },
  "definitions": {
    "Pet": {
      "required": [
        "name"
      ],
      "properties": {
        "name": {
          "type": "string"
        },
        "tag": {
          "type": "string"
        }
      }
    },
    "ErrorModel": {
      "required": [ "code", "message" ],
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32"
        },
        "message": {
          "type": "string"
        }
      }
    }
  }
}
