{
  "tags" : [
    {
      "externalDocs" : {
        "description" : "Find out more",
        "url" : "http://swagger.io"
      },
      "name" : "pet",
      "description" : "Everything about your Pets"
    },
    {
      "name" : "store",
      "description" : "Access to Petstore orders"
    },
    {
      "externalDocs" : {
        "description" : "Find out more about our store",
        "url" : "http://swagger.io"
      },
      "description" : "Operations about user",
      "name" : "user"
    }
  ],
  "externalDocs" : {
    "description" : "Find out more about Swagger",
    "url" : "http://swagger.io"
  },
  "paths" : {
    "/pet/{petId}/uploadImage" : {
      "post" : {
        "security" : [
          {
            "petstore_auth" : [
              "write:pets",
              "read:pets"
            ]
          }
        ],
        "produces" : [
          "application/json"
        ],
        "summary" : "uploads an image",
        "operationId" : "uploadFile",
        "consumes" : [
          "multipart/form-data"
        ],
        "description" : "",
        "tags" : [
          "pet"
        ],
        "responses" : {
          "200" : {
            "description" : "successful operation",
            "schema" : {
              "$ref" : "#/definitions/ApiResponse"
            }
          }
        },
        "parameters" : [
          {
            "name" : "petId",
            "in" : "path",
            "format" : "int64",
            "description" : "ID of pet to update",
            "type" : "integer",
            "required" : true
          },
          {
            "description" : "Additional data to pass to server",
            "name" : "additionalMetadata",
            "in" : "formData",
            "type" : "string",
            "required" : false
          },
          {
            "type" : "file",
            "required" : false,
            "name" : "file",
            "in" : "formData",
            "description" : "file to upload"
          }
        ]
      }
    },
    "/user/logout" : {
      "get" : {
        "responses" : {
          "default" : {
            "description" : "successful operation"
          }
        },
        "parameters" : [],
        "tags" : [
          "user"
        ],
        "summary" : "Logs out current logged in user session",
        "produces" : [
          "application/xml",
          "application/json"
        ],
        "operationId" : "logoutUser",
        "description" : ""
      }
    },
    "/user" : {
      "post" : {
        "description" : "This can only be done by the logged in user.",
        "operationId" : "createUser",
        "summary" : "Create user",
        "produces" : [
          "application/xml",
          "application/json"
        ],
        "tags" : [
          "user"
        ],
        "parameters" : [
          {
            "schema" : {
              "$ref" : "#/definitions/User"
            },
            "required" : true,
            "description" : "Created user object",
            "name" : "body",
            "in" : "body"
          }
        ],
        "responses" : {
          "default" : {
            "description" : "successful operation"
          }
        }
      }
    },
    "/user/{username}" : {
      "get" : {
        "tags" : [
          "user"
        ],
        "responses" : {
          "200" : {
            "description" : "successful operation",
            "schema" : {
              "$ref" : "#/definitions/User"
            }
          },
          "400" : {
            "description" : "Invalid username supplied"
          },
          "404" : {
            "description" : "User not found"
          }
        },
        "parameters" : [
          {
            "required" : true,
            "type" : "string",
            "description" : "The name that needs to be fetched. Use user1 for testing. ",
            "in" : "path",
            "name" : "username"
          }
        ],
        "description" : "",
        "operationId" : "getUserByName",
        "summary" : "Get user by user name",
        "produces" : [
          "application/xml",
          "application/json"
        ]
      },
      "put" : {
        "summary" : "Updated user",
        "produces" : [
          "application/xml",
          "application/json"
        ],
        "operationId" : "updateUser",
        "description" : "This can only be done by the logged in user.",
        "parameters" : [
          {
            "type" : "string",
            "required" : true,
            "description" : "name that need to be updated",
            "name" : "username",
            "in" : "path"
          },
          {
            "required" : true,
            "schema" : {
              "$ref" : "#/definitions/User"
            },
            "name" : "body",
            "in" : "body",
            "description" : "Updated user object"
          }
        ],
        "responses" : {
          "404" : {
            "description" : "User not found"
          },
          "400" : {
            "description" : "Invalid user supplied"
          }
        },
        "tags" : [
          "user"
        ]
      },
      "delete" : {
        "description" : "This can only be done by the logged in user.",
        "operationId" : "deleteUser",
        "produces" : [
          "application/xml",
          "application/json"
        ],
        "summary" : "Delete user",
        "tags" : [
          "user"
        ],
        "parameters" : [
          {
            "required" : true,
            "type" : "string",
            "in" : "path",
            "name" : "username",
            "description" : "The name that needs to be deleted"
          }
        ],
        "responses" : {
          "404" : {
            "description" : "User not found"
          },
          "400" : {
            "description" : "Invalid username supplied"
          }
        }
      }
    },
    "/store/order/{orderId}" : {
      "delete" : {
        "operationId" : "deleteOrder",
        "summary" : "Delete purchase order by ID",
        "produces" : [
          "application/xml",
          "application/json"
        ],
        "description" : "For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors",
        "tags" : [
          "store"
        ],
        "responses" : {
          "400" : {
            "description" : "Invalid ID supplied"
          },
          "404" : {
            "description" : "Order not found"
          }
        },
        "parameters" : [
          {
            "type" : "integer",
            "required" : true,
            "name" : "orderId",
            "minimum" : 1,
            "in" : "path",
            "description" : "ID of the order that needs to be deleted",
            "format" : "int64"
          }
        ]
      },
      "get" : {
        "description" : "For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions",
        "produces" : [
          "application/xml",
          "application/json"
        ],
        "summary" : "Find purchase order by ID",
        "operationId" : "getOrderById",
        "responses" : {
          "400" : {
            "description" : "Invalid ID supplied"
          },
          "404" : {
            "description" : "Order not found"
          },
          "200" : {
            "description" : "successful operation",
            "schema" : {
              "$ref" : "#/definitions/Order"
            }
          }
        },
        "parameters" : [
          {
            "in" : "path",
            "name" : "orderId",
            "type" : "integer",
            "minimum" : 1,
            "description" : "ID of pet that needs to be fetched",
            "format" : "int64",
            "required" : true,
            "maximum" : 10
          }
        ],
        "tags" : [
          "store"
        ]
      }
    },
    "/user/login" : {
      "get" : {
        "summary" : "Logs user into the system",
        "produces" : [
          "application/xml",
          "application/json"
        ],
        "operationId" : "loginUser",
        "description" : "",
        "responses" : {
          "400" : {
            "description" : "Invalid username/password supplied"
          },
          "200" : {
            "headers" : {
              "X-Expires-After" : {
                "type" : "string",
                "format" : "date-time",
                "description" : "date in UTC when token expires"
              },
              "X-Rate-Limit" : {
                "type" : "integer",
                "format" : "int32",
                "description" : "calls per hour allowed by the user"
              }
            },
            "schema" : {
              "type" : "string"
            },
            "description" : "successful operation"
          }
        },
        "parameters" : [
          {
            "name" : "username",
            "in" : "query",
            "description" : "The user name for login",
            "type" : "string",
            "required" : true
          },
          {
            "type" : "string",
            "required" : true,
            "name" : "password",
            "in" : "query",
            "description" : "The password for login in clear text"
          }
        ],
        "tags" : [
          "user"
        ]
      }
    },
    "/user/createWithArray" : {
      "post" : {
        "description" : "",
        "operationId" : "createUsersWithArrayInput",
        "produces" : [
          "application/xml",
          "application/json"
        ],
        "summary" : "Creates list of users with given input array",
        "tags" : [
          "user"
        ],
        "responses" : {
          "default" : {
            "description" : "successful operation"
          }
        },
        "parameters" : [
          {
            "required" : true,
            "schema" : {
              "type" : "array",
              "items" : {
                "$ref" : "#/definitions/User"
              }
            },
            "in" : "body",
            "name" : "body",
            "description" : "List of user object"
          }
        ]
      }
    },
    "/pet/findByTags" : {
      "get" : {
        "security" : [
          {
            "petstore_auth" : [
              "write:pets",
              "read:pets"
            ]
          }
        ],
        "produces" : [
          "application/xml",
          "application/json"
        ],
        "summary" : "Finds Pets by tags",
        "deprecated" : true,
        "description" : "Muliple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.",
        "operationId" : "findPetsByTags",
        "tags" : [
          "pet"
        ],
        "parameters" : [
          {
            "type" : "array",
            "collectionFormat" : "multi",
            "required" : true,
            "name" : "tags",
            "in" : "query",
            "description" : "Tags to filter by",
            "items" : {
              "type" : "string"
            }
          }
        ],
        "responses" : {
          "200" : {
            "schema" : {
              "type" : "array",
              "items" : {
                "$ref" : "#/definitions/Pet"
              }
            },
            "description" : "successful operation"
          },
          "400" : {
            "description" : "Invalid tag value"
          }
        }
      }
    },
    "/user/createWithList" : {
      "post" : {
        "description" : "",
        "produces" : [
          "application/xml",
          "application/json"
        ],
        "summary" : "Creates list of users with given input array",
        "operationId" : "createUsersWithListInput",
        "responses" : {
          "default" : {
            "description" : "successful operation"
          }
        },
        "parameters" : [
          {
            "description" : "List of user object",
            "name" : "body",
            "in" : "body",
            "schema" : {
              "items" : {
                "$ref" : "#/definitions/User"
              },
              "type" : "array"
            },
            "required" : true
          }
        ],
        "tags" : [
          "user"
        ]
      }
    },
    "/pet/{petId}" : {
      "delete" : {
        "parameters" : [
          {
            "in" : "header",
            "name" : "api_key",
            "required" : false,
            "type" : "string"
          },
          {
            "type" : "integer",
            "required" : true,
            "description" : "Pet id to delete",
            "format" : "int64",
            "name" : "petId",
            "in" : "path"
          }
        ],
        "responses" : {
          "400" : {
            "description" : "Invalid ID supplied"
          },
          "404" : {
            "description" : "Pet not found"
          }
        },
        "tags" : [
          "pet"
        ],
        "operationId" : "deletePet",
        "description" : "",
        "produces" : [
          "application/xml",
          "application/json"
        ],
        "summary" : "Deletes a pet",
        "security" : [
          {
            "petstore_auth" : [
              "write:pets",
              "read:pets"
            ]
          }
        ]
      },
      "post" : {
        "description" : "",
        "operationId" : "updatePetWithForm",
        "consumes" : [
          "application/x-www-form-urlencoded"
        ],
        "tags" : [
          "pet"
        ],
        "parameters" : [
          {
            "in" : "path",
            "name" : "petId",
            "description" : "ID of pet that needs to be updated",
            "format" : "int64",
            "required" : true,
            "type" : "integer"
          },
          {
            "name" : "name",
            "in" : "formData",
            "description" : "Updated name of the pet",
            "type" : "string",
            "required" : false
          },
          {
            "type" : "string",
            "required" : false,
            "description" : "Updated status of the pet",
            "name" : "status",
            "in" : "formData"
          }
        ],
        "responses" : {
          "405" : {
            "description" : "Invalid input"
          }
        },
        "security" : [
          {
            "petstore_auth" : [
              "write:pets",
              "read:pets"
            ]
          }
        ],
        "summary" : "Updates a pet in the store with form data",
        "produces" : [
          "application/xml",
          "application/json"
        ]
      },
      "get" : {
        "summary" : "Find pet by ID",
        "produces" : [
          "application/xml",
          "application/json"
        ],
        "security" : [
          {
            "api_key" : []
          }
        ],
        "description" : "Returns a single pet",
        "operationId" : "getPetById",
        "responses" : {
          "404" : {
            "description" : "Pet not found"
          },
          "400" : {
            "description" : "Invalid ID supplied"
          },
          "200" : {
            "schema" : {
              "$ref" : "#/definitions/Pet"
            },
            "description" : "successful operation"
          }
        },
        "parameters" : [
          {
            "in" : "path",
            "name" : "petId",
            "description" : "ID of pet to return",
            "format" : "int64",
            "required" : true,
            "type" : "integer"
          }
        ],
        "tags" : [
          "pet"
        ]
      }
    },
    "/pet/findByStatus" : {
      "get" : {
        "parameters" : [
          {
            "type" : "array",
            "collectionFormat" : "multi",
            "required" : true,
            "description" : "Status values that need to be considered for filter",
            "items" : {
              "type" : "string",
              "default" : "available",
              "enum" : [
                "available",
                "pending",
                "sold"
              ]
            },
            "name" : "status",
            "in" : "query"
          }
        ],
        "responses" : {
          "200" : {
            "description" : "successful operation",
            "schema" : {
              "items" : {
                "$ref" : "#/definitions/Pet"
              },
              "type" : "array"
            }
          },
          "400" : {
            "description" : "Invalid status value"
          }
        },
        "tags" : [
          "pet"
        ],
        "operationId" : "findPetsByStatus",
        "description" : "Multiple status values can be provided with comma separated strings",
        "summary" : "Finds Pets by status",
        "produces" : [
          "application/xml",
          "application/json"
        ],
        "security" : [
          {
            "petstore_auth" : [
              "write:pets",
              "read:pets"
            ]
          }
        ]
      }
    },
    "/pet" : {
      "put" : {
        "parameters" : [
          {
            "schema" : {
              "$ref" : "#/definitions/Pet"
            },
            "required" : true,
            "description" : "Pet object that needs to be added to the store",
            "name" : "body",
            "in" : "body"
          }
        ],
        "responses" : {
          "400" : {
            "description" : "Invalid ID supplied"
          },
          "405" : {
            "description" : "Validation exception"
          },
          "404" : {
            "description" : "Pet not found"
          }
        },
        "tags" : [
          "pet"
        ],
        "description" : "",
        "consumes" : [
          "application/json",
          "application/xml"
        ],
        "operationId" : "updatePet",
        "summary" : "Update an existing pet",
        "produces" : [
          "application/xml",
          "application/json"
        ],
        "security" : [
          {
            "petstore_auth" : [
              "write:pets",
              "read:pets"
            ]
          }
        ]
      },
      "post" : {
        "security" : [
          {
            "petstore_auth" : [
              "write:pets",
              "read:pets"
            ]
          }
        ],
        "produces" : [
          "application/xml",
          "application/json"
        ],
        "summary" : "Add a new pet to the store",
        "operationId" : "addPet",
        "consumes" : [
          "application/json",
          "application/xml"
        ],
        "description" : "",
        "tags" : [
          "pet"
        ],
        "parameters" : [
          {
            "in" : "body",
            "name" : "body",
            "description" : "Pet object that needs to be added to the store",
            "required" : true,
            "schema" : {
              "$ref" : "#/definitions/Pet"
            }
          }
        ],
        "responses" : {
          "405" : {
            "description" : "Invalid input"
          }
        }
      }
    },
    "/store/order" : {
      "post" : {
        "parameters" : [
          {
            "schema" : {
              "$ref" : "#/definitions/Order"
            },
            "required" : true,
            "description" : "order placed for purchasing the pet",
            "in" : "body",
            "name" : "body"
          }
        ],
        "responses" : {
          "400" : {
            "description" : "Invalid Order"
          },
          "200" : {
            "description" : "successful operation",
            "schema" : {
              "$ref" : "#/definitions/Order"
            }
          }
        },
        "tags" : [
          "store"
        ],
        "summary" : "Place an order for a pet",
        "produces" : [
          "application/xml",
          "application/json"
        ],
        "operationId" : "placeOrder",
        "description" : ""
      }
    },
    "/store/inventory" : {
      "get" : {
        "summary" : "Returns pet inventories by status",
        "produces" : [
          "application/json"
        ],
        "security" : [
          {
            "api_key" : []
          }
        ],
        "operationId" : "getInventory",
        "description" : "Returns a map of status codes to quantities",
        "responses" : {
          "200" : {
            "schema" : {
              "type" : "object",
              "additionalProperties" : {
                "type" : "integer",
                "format" : "int32"
              }
            },
            "description" : "successful operation"
          }
        },
        "parameters" : [],
        "tags" : [
          "store"
        ]
      }
    }
  },
  "host" : "petstore.swagger.io",
  "definitions" : {
    "User" : {
      "xml" : {
        "name" : "User"
      },
      "properties" : {
        "firstName" : {
          "type" : "string"
        },
        "phone" : {
          "type" : "string"
        },
        "userStatus" : {
          "type" : "integer",
          "description" : "User Status",
          "format" : "int32"
        },
        "lastName" : {
          "type" : "string"
        },
        "username" : {
          "type" : "string"
        },
        "email" : {
          "type" : "string"
        },
        "id" : {
          "type" : "integer",
          "format" : "int64"
        },
        "password" : {
          "type" : "string"
        }
      },
      "type" : "object"
    },
    "ApiResponse" : {
      "type" : "object",
      "properties" : {
        "type" : {
          "type" : "string"
        },
        "message" : {
          "type" : "string"
        },
        "code" : {
          "type" : "integer",
          "format" : "int32"
        }
      }
    },
    "Category" : {
      "type" : "object",
      "properties" : {
        "name" : {
          "type" : "string"
        },
        "id" : {
          "type" : "integer",
          "format" : "int64"
        }
      },
      "xml" : {
        "name" : "Category"
      }
    },
    "Pet" : {
      "required" : [
        "name",
        "photoUrls"
      ],
      "type" : "object",
      "xml" : {
        "name" : "Pet"
      },
      "properties" : {
        "category" : {
          "$ref" : "#/definitions/Category"
        },
        "name" : {
          "type" : "string",
          "example" : "doggie"
        },
        "status" : {
          "type" : "string",
          "description" : "pet status in the store",
          "enum" : [
            "available",
            "pending",
            "sold"
          ]
        },
        "photoUrls" : {
          "items" : {
            "type" : "string"
          },
          "xml" : {
            "wrapped" : true,
            "name" : "photoUrl"
          },
          "type" : "array"
        },
        "tags" : {
          "items" : {
            "$ref" : "#/definitions/Tag"
          },
          "xml" : {
            "wrapped" : true,
            "name" : "tag"
          },
          "type" : "array"
        },
        "id" : {
          "format" : "int64",
          "type" : "integer"
        }
      }
    },
    "Tag" : {
      "type" : "object",
      "properties" : {
        "name" : {
          "type" : "string"
        },
        "id" : {
          "format" : "int64",
          "type" : "integer"
        }
      },
      "xml" : {
        "name" : "Tag"
      }
    },
    "Order" : {
      "type" : "object",
      "xml" : {
        "name" : "Order"
      },
      "properties" : {
        "quantity" : {
          "format" : "int32",
          "type" : "integer"
        },
        "petId" : {
          "type" : "integer",
          "format" : "int64"
        },
        "complete" : {
          "type" : "boolean",
          "default" : false
        },
        "id" : {
          "type" : "integer",
          "format" : "int64"
        },
        "shipDate" : {
          "type" : "string",
          "format" : "date-time"
        },
        "status" : {
          "enum" : [
            "placed",
            "approved",
            "delivered"
          ],
          "description" : "Order Status",
          "type" : "string"
        }
      }
    }
  },
  "info" : {
    "title" : "Swagger Petstore",
    "contact" : {
      "email" : "apiteam@swagger.io"
    },
    "termsOfService" : "http://swagger.io/terms/",
    "version" : "1.0.0",
    "description" : "This is a sample server Petstore server.  You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).  For this sample, you can use the api key `special-key` to test the authorization filters.",
    "license" : {
      "url" : "http://www.apache.org/licenses/LICENSE-2.0.html",
      "name" : "Apache 2.0"
    }
  },
  "schemes" : [
    "http"
  ],
  "basePath" : "/v2",
  "securityDefinitions" : {
    "petstore_auth" : {
      "type" : "oauth2",
      "flow" : "implicit",
      "authorizationUrl" : "http://petstore.swagger.io/oauth/dialog",
      "scopes" : {
        "write:pets" : "modify pets in your account",
        "read:pets" : "read your pets"
      }
    },
    "api_key" : {
      "type" : "apiKey",
      "in" : "header",
      "name" : "api_key"
    }
  },
  "swagger" : "2.0"
}