{
    "swagger": "2.0",
    "info": {
        "version": "1.0.0",
        "title": "Swagger Sample App",
        "description": "This is a sample server Petstore server.  You can find out more about Swagger \n    at <a href=\"http://swagger.wordnik.com\">http://swagger.wordnik.com</a> or on irc.freenode.net, #swagger.  For this sample,\n    you can use the api key \"special-key\" to test the authorization filters",
        "contact": {
            "email": "apiteam@wordnik.com"
        },
        "license": {
            "name": "Apache 2.0",
            "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
        },
        "termsOfService": "http://helloreverb.com/terms/"
    },
    "tags": [
    {
        "description": "Operations about pets",
        "name": "pet"
    },
    {
        "description": "Operations about user",
        "name": "user"
    },
    {
        "description": "Operations about store",
        "name": "store"
    }],
    "paths": {
        "/pet": {
            "put": {
                "responses": {
                    "200": {
                        "description": "No response was specified"
                    },
                    "400": {
                        "description": "Invalid ID supplied"
                    },
                    "404": {
                        "description": "Pet not found"
                    },
                    "405": {
                        "description": "Validation exception"
                    }
                },
                "description": "",
                "summary": "Update an existing pet",
                "operationId": "updatePet",
                "tags": [
                    "pet"
                ],
                "produces": [
                    "application/json",
                    "application/xml",
                    "text/plain",
                    "text/html"
                ],
                "parameters": [
                    {
                        "in": "body",
                        "description": "Pet object that needs to be updated in the store",
                        "name": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/Pet"
                        }
                    }
                ]
            }
        },
        "/pet/findByStatus": {
            "get": {
                "responses": {
                    "200": {
                      "description": "No response was specified",
                      "schema": {
                        "type": "array",
                        "items": {
                          "$ref": "#/definitions/Pet"
                        }
                      }
                    },
                    "400": {
                        "description": "Invalid status value"
                    }
                },
                "description": "",
                "summary": "Finds Pets by status",
                "operationId": "findPetsByStatus",
                "tags": [
                    "pet"
                ],
                "produces": [
                    "application/json",
                    "application/xml",
                    "text/plain",
                    "text/html"
                ],
                "parameters": [
                    {
                        "in": "query",
                        "description": "Status values that need to be considered for filter",
                        "name": "status",
                        "required": true,
                        "type": "string"
                    }
                ]
            }
        },
        "/pet/findByTags": {
            "get": {
                "responses": {
                    "200": {
                        "description": "No response was specified",
                        "schema": {
                          "type": "array",
                          "items": {
                            "$ref": "#/definitions/Pet"
                          }
                        }
                    },
                    "400": {
                        "description": "Invalid tag value"
                    }
                },
                "description": "",
                "summary": "Finds Pets by tags",
                "operationId": "findPetsByTags",
                "tags": [
                    "pet"
                ],
                "produces": [
                    "application/json",
                    "application/xml",
                    "text/plain",
                    "text/html"
                ],
                "parameters": [
                    {
                        "in": "query",
                        "description": "Tags to filter by",
                        "name": "tags",
                        "required": true,
                        "type": "string"
                    }
                ]
            }
        },
        "/pet/{petId}": {
            "post": {
                "responses": {
                    "200": {
                        "description": "No response was specified"
                    },
                    "405": {
                        "description": "Invalid input"
                    }
                },
                "description": "",
                "summary": "Updates a pet in the store with form data",
                "operationId": "updatePetWithForm",
                "tags": [
                    "pet"
                ],
                "produces": [
                    "application/json",
                    "application/xml",
                    "text/plain",
                    "text/html"
                ],
                "parameters": [
                    {
                        "in": "path",
                        "description": "ID of pet that needs to be updated",
                        "name": "petId",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "in": "formData",
                        "description": "Updated name of the pet",
                        "name": "name",
                        "required": false,
                        "type": "string"
                    },
                    {
                        "in": "formData",
                        "description": "Updated status of the pet",
                        "name": "status",
                        "required": false,
                        "type": "string"
                    }
                ]
            },
            "get": {
                "responses": {
                    "200": {
                        "description": "No response was specified",
                        "schema": {
                            "$ref": "#/definitions/Pet"
                        }
                    },
                    "400": {
                        "description": "Invalid ID supplied"
                    },
                    "404": {
                        "description": "Pet not found"
                    }
                },
                "description": "",
                "summary": "Find pet by ID",
                "operationId": "getPetById",
                "tags": [
                    "pet"
                ],
                "produces": [
                    "application/json",
                    "application/xml",
                    "text/plain",
                    "text/html"
                ],
                "parameters": [
                    {
                        "in": "path",
                        "description": "ID of pet that needs to be fetched",
                        "name": "petId",
                        "required": true,
                        "type": "integer",
                        "default": 1,
                        "maximum": 100000,
                        "minimum": 1
                    }
                ]
            },
            "delete": {
                "responses": {
                    "200": {
                        "description": "No response was specified"
                    },
                    "400": {
                        "description": "Invalid pet value"
                    }
                },
                "description": "",
                "summary": "Deletes a pet",
                "operationId": "deletePet",
                "tags": [
                    "pet"
                ],
                "produces": [
                    "application/json",
                    "application/xml",
                    "text/plain",
                    "text/html"
                ],
                "parameters": [
                    {
                        "in": "path",
                        "description": "Pet id to delete",
                        "name": "petId",
                        "required": true,
                        "type": "string"
                    }
                ]
            },
            "patch": {
                "responses": {
                    "200": {
                        "description": "No response was specified",
                        "schema": {
                          "type": "array",
                          "items": {
                            "$ref": "#/definitions/Pet"
                          }
                        }
                    },
                    "400": {
                        "description": "Invalid tag value"
                    }
                },
                "description": "",
                "summary": "partial updates to a pet",
                "operationId": "partialUpdate",
                "tags": [
                    "pet"
                ],
                "produces": [
                    "application/json",
                    "application/xml",
                    "text/plain",
                    "text/html"
                ],
                "parameters": [
                    {
                        "in": "path",
                        "description": "ID of pet that needs to be fetched",
                        "name": "petId",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "in": "body",
                        "description": "Pet object that needs to be added to the store",
                        "name": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/Pet"
                        }
                    }
                ]
            }
        },
        "/pet/uploadImage": {
            "post": {
                "responses": {
                    "200": {
                        "description": "No response was specified"
                    }
                },
                "description": "",
                "summary": "uploads an image",
                "operationId": "uploadFile",
                "tags": [
                    "pet"
                ],
                "produces": [
                    "application/json",
                    "application/xml",
                    "text/plain",
                    "text/html"
                ],
                "parameters": [
                    {
                        "in": "formData",
                        "description": "Additional data to pass to server",
                        "name": "additionalMetadata",
                        "required": false,
                        "type": "string"
                    },
                    {
                        "in": "formData",
                        "description": "file to upload",
                        "name": "file",
                        "required": false,
                        "type": "file"
                    }
                ]
            }
        },
        "/user/createWithArray": {
            "post": {
                "responses": {
                    "200": {
                        "description": "No response was specified"
                    }
                },
                "description": "",
                "summary": "Creates list of users with given input array",
                "operationId": "createUsersWithArrayInput",
                "tags": [
                    "user"
                ],
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "in": "body",
                        "description": "List of user object",
                        "name": "body",
                        "required": true,
                        "schema": {
                          "type": "array",
                          "items": {
                              "$ref": "#/definitions/User"
                          }
                        }
                    }
                ]
            }
        },
        "/user/createWithList": {
            "post": {
                "responses": {
                    "200": {
                        "description": "No response was specified"
                    }
                },
                "description": "",
                "summary": "Creates list of users with given list input",
                "operationId": "createUsersWithListInput",
                "tags": [
                    "user"
                ],
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "in": "body",
                        "description": "List of user object",
                        "name": "body",
                        "required": true,
                        "schema": {
                          "type": "array",
                          "items": {
                              "$ref": "#/definitions/User"
                          }
                        }
                    }
                ]
            }
        },
        "/user/{username}": {
            "put": {
                "responses": {
                    "200": {
                        "description": "No response was specified"
                    },
                    "400": {
                        "description": "Invalid username supplied"
                    },
                    "404": {
                        "description": "User not found"
                    }
                },
                "description": "",
                "summary": "Updated user",
                "operationId": "updateUser",
                "tags": [
                    "user"
                ],
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "in": "path",
                        "description": "name that need to be deleted",
                        "name": "username",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "in": "body",
                        "description": "Updated user object",
                        "name": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/User"
                        }
                    }
                ]
            },
            "delete": {
                "responses": {
                    "200": {
                        "description": "No response was specified"
                    },
                    "400": {
                        "description": "Invalid username supplied"
                    },
                    "404": {
                        "description": "User not found"
                    }
                },
                "description": "",
                "summary": "Delete user",
                "operationId": "deleteUser",
                "tags": [
                    "user"
                ],
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "in": "path",
                        "description": "The name that needs to be deleted",
                        "name": "username",
                        "required": true,
                        "type": "string"
                    }
                ]
            },
            "get": {
                "responses": {
                    "200": {
                        "description": "No response was specified",
                        "schema": {
                          "$ref": "#/definitions/User"
                        }
                    },
                    "400": {
                        "description": "Invalid username supplied"
                    },
                    "404": {
                        "description": "User not found"
                    }
                },
                "description": "",
                "summary": "Get user by user name",
                "operationId": "getUserByName",
                "tags": [
                    "user"
                ],
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "in": "path",
                        "description": "The name that needs to be fetched. Use user1 for testing.",
                        "name": "username",
                        "required": true,
                        "type": "string"
                    }
                ]
            }
        },
        "/user/login": {
            "get": {
                "responses": {
                    "200": {
                        "description": "No response was specified",
                        "schema": {
                          "type": "string"
                        }
                    },
                    "400": {
                        "description": "Invalid username and password combination"
                    }
                },
                "description": "",
                "summary": "Logs user into the system",
                "operationId": "loginUser",
                "tags": [
                    "user"
                ],
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "in": "query",
                        "description": "The user name for login",
                        "name": "username",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "in": "query",
                        "description": "The password for login in clear text",
                        "name": "password",
                        "required": true,
                        "type": "string"
                    }
                ]
            }
        },
        "/user/logout": {
            "get": {
                "responses": {
                    "200": {
                        "description": "No response was specified"
                    }
                },
                "description": "",
                "summary": "Logs out current logged in user session",
                "operationId": "logoutUser",
                "tags": [
                    "user"
                ],
                "produces": [
                    "application/json"
                ]
            }
        },
        "/user": {
            "post": {
                "responses": {
                    "200": {
                        "description": "No response was specified"
                    }
                },
                "description": "",
                "summary": "Create user",
                "operationId": "createUser",
                "tags": [
                    "user"
                ],
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "in": "body",
                        "description": "Created user object",
                        "name": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/User"
                        }
                    }
                ]
            }
        },
        "/store/order": {
            "post": {
                "responses": {
                    "200": {
                        "description": "No response was specified"
                    },
                    "400": {
                        "description": "Invalid order"
                    }
                },
                "description": "",
                "summary": "Place an order for a pet",
                "operationId": "placeOrder",
                "tags": [
                    "store"
                ],
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "in": "body",
                        "description": "order placed for purchasing the pet",
                        "name": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/Order"
                        }
                    }
                ]
            }
        },
        "/store/order/{orderId}": {
            "delete": {
                "responses": {
                    "200": {
                        "description": "No response was specified"
                    },
                    "400": {
                        "description": "Invalid ID supplied"
                    },
                    "404": {
                        "description": "Order not found"
                    }
                },
                "description": "",
                "summary": "Delete purchase order by ID",
                "operationId": "deleteOrder",
                "tags": [
                    "store"
                ],
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "in": "path",
                        "description": "ID of the order that needs to be deleted",
                        "name": "orderId",
                        "required": true,
                        "type": "string"
                    }
                ]
            },
            "get": {
                "responses": {
                    "200": {
                        "description": "No response was specified",
                        "schema": {
                            "$ref": "#/definitions/Order"
                        }
                    },
                    "400": {
                        "description": "Invalid ID supplied"
                    },
                    "404": {
                        "description": "Order not found"
                    }
                },
                "description": "",
                "summary": "Find purchase order by ID",
                "operationId": "getOrderById",
                "tags": [
                    "store"
                ],
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "in": "path",
                        "description": "ID of pet that needs to be fetched",
                        "name": "orderId",
                        "required": true,
                        "type": "string"
                    }
                ]
            }
        }
    },
    "securityDefinitions": {
        "oauth2_implicit": {
            "type": "oauth2",
            "flow": "implicit",
            "authorizationUrl": "http://petstore.swagger.wordnik.com/api/oauth/dialog",
            "scopes": {
                "write:pets": "Modify pets in your account",
                "read:pets": "Read your pets"
            }
        },
        "oauth2_authorization_code": {
            "type": "oauth2",
            "flow": "accessCode",
            "authorizationUrl": "http://petstore.swagger.wordnik.com/api/oauth/requestToken",
            "tokenUrl": "http://petstore.swagger.wordnik.com/api/oauth/token",
            "scopes": {
                "write:pets": "Modify pets in your account",
                "read:pets": "Read your pets"
            }
        }
    },
    "host": "petstore.swagger.wordnik.com",
    "basePath": "/api",
    "schemes": [
        "http"
    ],
    "definitions": {
        "Tag": {
            "properties": {
                "id": {
                    "type": "integer",
                    "format": "int64"
                },
                "name": {
                    "type": "string"
                }
            }
        },
        "Pet": {
            "required": [
                "id",
                "name"
            ],
            "properties": {
                "id": {
                    "type": "integer",
                    "format": "int64",
                    "description": "unique identifier for the pet",
                    "minimum": 0,
                    "maximum": 100,
                    "default": 1
                },
                "category": {
                    "$ref": "#/definitions/Category"
                },
                "name": {
                    "type": "string"
                },
                "photoUrls": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "tags": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/Tag"
                    }
                },
                "status": {
                    "type": "string",
                    "description": "pet status in the store",
                    "enum": [
                        "available",
                        "pending",
                        "sold"
                    ]
                }
            }
        },
        "Category": {
            "properties": {
                "id": {
                    "type": "integer",
                    "format": "int64"
                },
                "name": {
                    "type": "string"
                }
            }
        },
        "Animal": {
            "required": [
                "id",
                "type"
            ],
            "properties": {
                "id": {
                    "type": "integer"
                },
                "type": {
                    "type": "string"
                }
            },
            "discriminator": "type"
        },
        "Cat": {
            "allOf": [
                {
                    "$ref": "#/definitions/Animal"
                },
                {
                    "required": [
                        "likesMilk"
                    ],
                    "properties": {
                        "likesMilk": {
                            "type": "boolean"
                        }
                    }
                }
            ]
        },
        "User": {
            "properties": {
                "id": {
                    "type": "integer",
                    "format": "int64"
                },
                "firstName": {
                    "type": "string"
                },
                "username": {
                    "type": "string"
                },
                "lastName": {
                    "type": "string"
                },
                "email": {
                    "type": "string"
                },
                "password": {
                    "type": "string"
                },
                "phone": {
                    "type": "string"
                },
                "userStatus": {
                    "type": "integer",
                    "format": "int32",
                    "description": "User Status",
                    "enum": [
                        "1-registered",
                        "2-active",
                        "3-closed"
                    ]
                }
            }
        },
        "Order": {
            "properties": {
                "id": {
                    "type": "integer",
                    "format": "int64"
                },
                "petId": {
                    "type": "integer",
                    "format": "int64"
                },
                "quantity": {
                    "type": "integer",
                    "format": "int32"
                },
                "status": {
                    "type": "string",
                    "description": "Order Status",
                    "enum": [
                        "placed",
                        " approved",
                        " delivered"
                    ]
                },
                "shipDate": {
                    "type": "string",
                    "format": "date-time"
                }
            }
        }
    }
}
