h1. OpenAPI Petstore This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.

*Version:* 1.0.0

----

{toc:printable=true|style=square|minLevel=2|maxLevel=3|type=list|outline=false|include=.*}

h2. Endpoints

    h3. addPet
    {status:colour=Yellow|title=post|subtle=false}
    {code}
    post /pet
    {code}
    *Summary:* Add a new pet to the store
    *Description:* 


    h4. Parameters

        h5. Body Parameter
        ||Name||Description||Required||Default||Pattern||
        |pet |Pet object that needs to be added to the store |(/) | |  |







    h4. Responses
        *Status Code:* 405
        *Message:*     Invalid input
        {code:title=Response Type}

        {code}
        See [#models]



        {code:title=Response Schema |collapse=true}
{
  "description" : "Invalid input",
  "content" : { }
}
        {code}
    ----

    h3. deletePet
    {status:colour=Yellow|title=delete|subtle=false}
    {code}
    delete /pet/{petId}
    {code}
    *Summary:* Deletes a pet
    *Description:* 


    h4. Parameters
        h5. Path Parameters
        ||Name||Description||Required||Default||Pattern||
        |petId |Pet id to delete |(/) |null |  |



        h5. Header Parameters
        ||Name||Description||Required||Default||Pattern||
        |apiKey | |(x) |null |  |






    h4. Responses
        *Status Code:* 400
        *Message:*     Invalid pet value
        {code:title=Response Type}

        {code}
        See [#models]



        {code:title=Response Schema |collapse=true}
{
  "description" : "Invalid pet value",
  "content" : { }
}
        {code}
    ----

    h3. findPetsByStatus
    {status:colour=Yellow|title=get|subtle=false}
    {code}
    get /pet/findByStatus
    {code}
    *Summary:* Finds Pets by status
    *Description:* Multiple status values can be provided with comma separated strings


    h4. Parameters



        h5. Query Parameters
        ||Name||Description||Required||Default||Pattern||
        |status |Status values that need to be considered for filter |(/) |null |  |





    h4. Responses
        *Status Code:* 200
        *Message:*     successful operation
        {code:title=Response Type}
array[Pet]
        {code}
        See [#models]



        {code:title=Response Schema |collapse=true}
{
  "description" : "successful operation",
  "content" : {
    "application/xml" : {
      "schema" : {
        "type" : "array",
        "items" : {
          "$ref" : "#/components/schemas/Pet"
        }
      }
    },
    "application/json" : {
      "schema" : {
        "type" : "array",
        "items" : {
          "$ref" : "#/components/schemas/Pet"
        }
      }
    }
  }
}
        {code}
        *Status Code:* 400
        *Message:*     Invalid status value
        {code:title=Response Type}

        {code}
        See [#models]



        {code:title=Response Schema |collapse=true}
{
  "description" : "Invalid status value",
  "content" : { }
}
        {code}
    ----

    h3. findPetsByTags
    {status:colour=Yellow|title=get|subtle=false}
    {code}
    get /pet/findByTags
    {code}
    *Summary:* Finds Pets by tags
    *Description:* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.


    h4. Parameters



        h5. Query Parameters
        ||Name||Description||Required||Default||Pattern||
        |tags |Tags to filter by |(/) |null |  |





    h4. Responses
        *Status Code:* 200
        *Message:*     successful operation
        {code:title=Response Type}
array[Pet]
        {code}
        See [#models]



        {code:title=Response Schema |collapse=true}
{
  "description" : "successful operation",
  "content" : {
    "application/xml" : {
      "schema" : {
        "type" : "array",
        "items" : {
          "$ref" : "#/components/schemas/Pet"
        }
      }
    },
    "application/json" : {
      "schema" : {
        "type" : "array",
        "items" : {
          "$ref" : "#/components/schemas/Pet"
        }
      }
    }
  }
}
        {code}
        *Status Code:* 400
        *Message:*     Invalid tag value
        {code:title=Response Type}

        {code}
        See [#models]



        {code:title=Response Schema |collapse=true}
{
  "description" : "Invalid tag value",
  "content" : { }
}
        {code}
    ----

    h3. getPetById
    {status:colour=Yellow|title=get|subtle=false}
    {code}
    get /pet/{petId}
    {code}
    *Summary:* Find pet by ID
    *Description:* Returns a single pet


    h4. Parameters
        h5. Path Parameters
        ||Name||Description||Required||Default||Pattern||
        |petId |ID of pet to return |(/) |null |  |








    h4. Responses
        *Status Code:* 200
        *Message:*     successful operation
        {code:title=Response Type}
Pet
        {code}
        See [#models]



        {code:title=Response Schema |collapse=true}
{
  "description" : "successful operation",
  "content" : {
    "application/xml" : {
      "schema" : {
        "$ref" : "#/components/schemas/Pet"
      }
    },
    "application/json" : {
      "schema" : {
        "$ref" : "#/components/schemas/Pet"
      }
    }
  }
}
        {code}
        *Status Code:* 400
        *Message:*     Invalid ID supplied
        {code:title=Response Type}

        {code}
        See [#models]



        {code:title=Response Schema |collapse=true}
{
  "description" : "Invalid ID supplied",
  "content" : { }
}
        {code}
        *Status Code:* 404
        *Message:*     Pet not found
        {code:title=Response Type}

        {code}
        See [#models]



        {code:title=Response Schema |collapse=true}
{
  "description" : "Pet not found",
  "content" : { }
}
        {code}
    ----

    h3. updatePet
    {status:colour=Yellow|title=put|subtle=false}
    {code}
    put /pet
    {code}
    *Summary:* Update an existing pet
    *Description:* 


    h4. Parameters

        h5. Body Parameter
        ||Name||Description||Required||Default||Pattern||
        |pet |Pet object that needs to be added to the store |(/) | |  |







    h4. Responses
        *Status Code:* 400
        *Message:*     Invalid ID supplied
        {code:title=Response Type}

        {code}
        See [#models]



        {code:title=Response Schema |collapse=true}
{
  "description" : "Invalid ID supplied",
  "content" : { }
}
        {code}
        *Status Code:* 404
        *Message:*     Pet not found
        {code:title=Response Type}

        {code}
        See [#models]



        {code:title=Response Schema |collapse=true}
{
  "description" : "Pet not found",
  "content" : { }
}
        {code}
        *Status Code:* 405
        *Message:*     Validation exception
        {code:title=Response Type}

        {code}
        See [#models]



        {code:title=Response Schema |collapse=true}
{
  "description" : "Validation exception",
  "content" : { }
}
        {code}
    ----

    h3. updatePetWithForm
    {status:colour=Yellow|title=post|subtle=false}
    {code}
    post /pet/{petId}
    {code}
    *Summary:* Updates a pet in the store with form data
    *Description:* 


    h4. Parameters
        h5. Path Parameters
        ||Name||Description||Required||Default||Pattern||
        |petId |ID of pet that needs to be updated |(/) |null |  |








    h4. Responses
        *Status Code:* 405
        *Message:*     Invalid input
        {code:title=Response Type}

        {code}
        See [#models]



        {code:title=Response Schema |collapse=true}
{
  "description" : "Invalid input",
  "content" : { }
}
        {code}
    ----

    h3. uploadFile
    {status:colour=Yellow|title=post|subtle=false}
    {code}
    post /pet/{petId}/uploadImage
    {code}
    *Summary:* uploads an image
    *Description:* 


    h4. Parameters
        h5. Path Parameters
        ||Name||Description||Required||Default||Pattern||
        |petId |ID of pet to update |(/) |null |  |








    h4. Responses
        *Status Code:* 200
        *Message:*     successful operation
        {code:title=Response Type}
ApiResponse
        {code}
        See [#models]



        {code:title=Response Schema |collapse=true}
{
  "description" : "successful operation",
  "content" : {
    "application/json" : {
      "schema" : {
        "$ref" : "#/components/schemas/ApiResponse"
      }
    }
  }
}
        {code}
    ----

    h3. deleteOrder
    {status:colour=Yellow|title=delete|subtle=false}
    {code}
    delete /store/order/{orderId}
    {code}
    *Summary:* Delete purchase order by ID
    *Description:* For valid response try integer IDs with value &lt; 1000. Anything above 1000 or nonintegers will generate API errors


    h4. Parameters
        h5. Path Parameters
        ||Name||Description||Required||Default||Pattern||
        |orderId |ID of the order that needs to be deleted |(/) |null |  |








    h4. Responses
        *Status Code:* 400
        *Message:*     Invalid ID supplied
        {code:title=Response Type}

        {code}
        See [#models]



        {code:title=Response Schema |collapse=true}
{
  "description" : "Invalid ID supplied",
  "content" : { }
}
        {code}
        *Status Code:* 404
        *Message:*     Order not found
        {code:title=Response Type}

        {code}
        See [#models]



        {code:title=Response Schema |collapse=true}
{
  "description" : "Order not found",
  "content" : { }
}
        {code}
    ----

    h3. getInventory
    {status:colour=Yellow|title=get|subtle=false}
    {code}
    get /store/inventory
    {code}
    *Summary:* Returns pet inventories by status
    *Description:* Returns a map of status codes to quantities


    h4. Parameters







    h4. Responses
        *Status Code:* 200
        *Message:*     successful operation
        {code:title=Response Type}
map[String, Integer]
        {code}
        See [#models]



        {code:title=Response Schema |collapse=true}
{
  "description" : "successful operation",
  "content" : {
    "application/json" : {
      "schema" : {
        "type" : "object",
        "additionalProperties" : {
          "type" : "integer",
          "format" : "int32"
        }
      }
    }
  }
}
        {code}
    ----

    h3. getOrderById
    {status:colour=Yellow|title=get|subtle=false}
    {code}
    get /store/order/{orderId}
    {code}
    *Summary:* Find purchase order by ID
    *Description:* For valid response try integer IDs with value &lt;&#x3D; 5 or &gt; 10. Other values will generated exceptions


    h4. Parameters
        h5. Path Parameters
        ||Name||Description||Required||Default||Pattern||
        |orderId |ID of pet that needs to be fetched |(/) |null |  |








    h4. Responses
        *Status Code:* 200
        *Message:*     successful operation
        {code:title=Response Type}
Order
        {code}
        See [#models]



        {code:title=Response Schema |collapse=true}
{
  "description" : "successful operation",
  "content" : {
    "application/xml" : {
      "schema" : {
        "$ref" : "#/components/schemas/Order"
      }
    },
    "application/json" : {
      "schema" : {
        "$ref" : "#/components/schemas/Order"
      }
    }
  }
}
        {code}
        *Status Code:* 400
        *Message:*     Invalid ID supplied
        {code:title=Response Type}

        {code}
        See [#models]



        {code:title=Response Schema |collapse=true}
{
  "description" : "Invalid ID supplied",
  "content" : { }
}
        {code}
        *Status Code:* 404
        *Message:*     Order not found
        {code:title=Response Type}

        {code}
        See [#models]



        {code:title=Response Schema |collapse=true}
{
  "description" : "Order not found",
  "content" : { }
}
        {code}
    ----

    h3. placeOrder
    {status:colour=Yellow|title=post|subtle=false}
    {code}
    post /store/order
    {code}
    *Summary:* Place an order for a pet
    *Description:* 


    h4. Parameters

        h5. Body Parameter
        ||Name||Description||Required||Default||Pattern||
        |order |order placed for purchasing the pet |(/) | |  |







    h4. Responses
        *Status Code:* 200
        *Message:*     successful operation
        {code:title=Response Type}
Order
        {code}
        See [#models]



        {code:title=Response Schema |collapse=true}
{
  "description" : "successful operation",
  "content" : {
    "application/xml" : {
      "schema" : {
        "$ref" : "#/components/schemas/Order"
      }
    },
    "application/json" : {
      "schema" : {
        "$ref" : "#/components/schemas/Order"
      }
    }
  }
}
        {code}
        *Status Code:* 400
        *Message:*     Invalid Order
        {code:title=Response Type}

        {code}
        See [#models]



        {code:title=Response Schema |collapse=true}
{
  "description" : "Invalid Order",
  "content" : { }
}
        {code}
    ----

    h3. createUser
    {status:colour=Yellow|title=post|subtle=false}
    {code}
    post /user
    {code}
    *Summary:* Create user
    *Description:* This can only be done by the logged in user.


    h4. Parameters

        h5. Body Parameter
        ||Name||Description||Required||Default||Pattern||
        |user |Created user object |(/) | |  |







    h4. Responses
        *Status Code:* 0
        *Message:*     successful operation
        {code:title=Response Type}

        {code}
        See [#models]



        {code:title=Response Schema |collapse=true}
{
  "description" : "successful operation",
  "content" : { }
}
        {code}
    ----

    h3. createUsersWithArrayInput
    {status:colour=Yellow|title=post|subtle=false}
    {code}
    post /user/createWithArray
    {code}
    *Summary:* Creates list of users with given input array
    *Description:* 


    h4. Parameters

        h5. Body Parameter
        ||Name||Description||Required||Default||Pattern||
        |user |List of user object |(/) | |  |







    h4. Responses
        *Status Code:* 0
        *Message:*     successful operation
        {code:title=Response Type}

        {code}
        See [#models]



        {code:title=Response Schema |collapse=true}
{
  "description" : "successful operation",
  "content" : { }
}
        {code}
    ----

    h3. createUsersWithListInput
    {status:colour=Yellow|title=post|subtle=false}
    {code}
    post /user/createWithList
    {code}
    *Summary:* Creates list of users with given input array
    *Description:* 


    h4. Parameters

        h5. Body Parameter
        ||Name||Description||Required||Default||Pattern||
        |user |List of user object |(/) | |  |







    h4. Responses
        *Status Code:* 0
        *Message:*     successful operation
        {code:title=Response Type}

        {code}
        See [#models]



        {code:title=Response Schema |collapse=true}
{
  "description" : "successful operation",
  "content" : { }
}
        {code}
    ----

    h3. deleteUser
    {status:colour=Yellow|title=delete|subtle=false}
    {code}
    delete /user/{username}
    {code}
    *Summary:* Delete user
    *Description:* This can only be done by the logged in user.


    h4. Parameters
        h5. Path Parameters
        ||Name||Description||Required||Default||Pattern||
        |username |The name that needs to be deleted |(/) |null |  |








    h4. Responses
        *Status Code:* 400
        *Message:*     Invalid username supplied
        {code:title=Response Type}

        {code}
        See [#models]



        {code:title=Response Schema |collapse=true}
{
  "description" : "Invalid username supplied",
  "content" : { }
}
        {code}
        *Status Code:* 404
        *Message:*     User not found
        {code:title=Response Type}

        {code}
        See [#models]



        {code:title=Response Schema |collapse=true}
{
  "description" : "User not found",
  "content" : { }
}
        {code}
    ----

    h3. getUserByName
    {status:colour=Yellow|title=get|subtle=false}
    {code}
    get /user/{username}
    {code}
    *Summary:* Get user by user name
    *Description:* 


    h4. Parameters
        h5. Path Parameters
        ||Name||Description||Required||Default||Pattern||
        |username |The name that needs to be fetched. Use user1 for testing. |(/) |null |  |








    h4. Responses
        *Status Code:* 200
        *Message:*     successful operation
        {code:title=Response Type}
User
        {code}
        See [#models]



        {code:title=Response Schema |collapse=true}
{
  "description" : "successful operation",
  "content" : {
    "application/xml" : {
      "schema" : {
        "$ref" : "#/components/schemas/User"
      }
    },
    "application/json" : {
      "schema" : {
        "$ref" : "#/components/schemas/User"
      }
    }
  }
}
        {code}
        *Status Code:* 400
        *Message:*     Invalid username supplied
        {code:title=Response Type}

        {code}
        See [#models]



        {code:title=Response Schema |collapse=true}
{
  "description" : "Invalid username supplied",
  "content" : { }
}
        {code}
        *Status Code:* 404
        *Message:*     User not found
        {code:title=Response Type}

        {code}
        See [#models]



        {code:title=Response Schema |collapse=true}
{
  "description" : "User not found",
  "content" : { }
}
        {code}
    ----

    h3. loginUser
    {status:colour=Yellow|title=get|subtle=false}
    {code}
    get /user/login
    {code}
    *Summary:* Logs user into the system
    *Description:* 


    h4. Parameters



        h5. Query Parameters
        ||Name||Description||Required||Default||Pattern||
        |username |The user name for login |(/) |null |  |

|password |The password for login in clear text |(/) |null |  |





    h4. Responses
        *Status Code:* 200
        *Message:*     successful operation
        {code:title=Response Type}
String
        {code}
        See [#models]



        {code:title=Response Schema |collapse=true}
{
  "description" : "successful operation",
  "headers" : {
    "X-Rate-Limit" : {
      "description" : "calls per hour allowed by the user",
      "schema" : {
        "type" : "integer",
        "format" : "int32"
      }
    },
    "X-Expires-After" : {
      "description" : "date in UTC when toekn expires",
      "schema" : {
        "type" : "string",
        "format" : "date-time"
      }
    }
  },
  "content" : {
    "application/xml" : {
      "schema" : {
        "type" : "string"
      }
    },
    "application/json" : {
      "schema" : {
        "type" : "string"
      }
    }
  }
}
        {code}
        *Status Code:* 400
        *Message:*     Invalid username/password supplied
        {code:title=Response Type}

        {code}
        See [#models]



        {code:title=Response Schema |collapse=true}
{
  "description" : "Invalid username/password supplied",
  "content" : { }
}
        {code}
    ----

    h3. logoutUser
    {status:colour=Yellow|title=get|subtle=false}
    {code}
    get /user/logout
    {code}
    *Summary:* Logs out current logged in user session
    *Description:* 


    h4. Parameters







    h4. Responses
        *Status Code:* 0
        *Message:*     successful operation
        {code:title=Response Type}

        {code}
        See [#models]



        {code:title=Response Schema |collapse=true}
{
  "description" : "successful operation",
  "content" : { }
}
        {code}
    ----

    h3. updateUser
    {status:colour=Yellow|title=put|subtle=false}
    {code}
    put /user/{username}
    {code}
    *Summary:* Updated user
    *Description:* This can only be done by the logged in user.


    h4. Parameters
        h5. Path Parameters
        ||Name||Description||Required||Default||Pattern||
        |username |name that need to be deleted |(/) |null |  |


        h5. Body Parameter
        ||Name||Description||Required||Default||Pattern||
        |user |Updated user object |(/) | |  |







    h4. Responses
        *Status Code:* 400
        *Message:*     Invalid user supplied
        {code:title=Response Type}

        {code}
        See [#models]



        {code:title=Response Schema |collapse=true}
{
  "description" : "Invalid user supplied",
  "content" : { }
}
        {code}
        *Status Code:* 404
        *Message:*     User not found
        {code:title=Response Type}

        {code}
        See [#models]



        {code:title=Response Schema |collapse=true}
{
  "description" : "User not found",
  "content" : { }
}
        {code}
    ----

h2. Models

        h3. ApiResponse
        ||Field Name||Required||Type||Description||
         |code | |Integer | |
 |type | |String | |
 |message | |String | |
        h3. Category
        ||Field Name||Required||Type||Description||
         |id | |Long | |
 |name | |String | |
        h3. Order
        ||Field Name||Required||Type||Description||
         |id | |Long | |
 |petId | |Long | |
 |quantity | |Integer | |
 |shipDate | |Date | |
 |status | |String |Order Status |
 |complete | |Boolean | |
        h3. Pet
        ||Field Name||Required||Type||Description||
         |id | |Long | |
 |category | |Category | |
 |name | |String | |
 |photoUrls | |array[String] | |
 |tags | |array[Tag] | |
 |status | |String |pet status in the store |
        h3. Tag
        ||Field Name||Required||Type||Description||
         |id | |Long | |
 |name | |String | |
        h3. User
        ||Field Name||Required||Type||Description||
         |id | |Long | |
 |username | |String | |
 |firstName | |String | |
 |lastName | |String | |
 |email | |String | |
 |password | |String | |
 |phone | |String | |
 |userStatus | |Integer |User Status |
