= Swagger Petstore
apiteam@swagger.io
v1.0.0
:revnumber: 1.0.0
:openapi: 3.0.0
:author: apiteam@swagger.io
:authorcount: 1

== Overview
This is a sample server Petstore server.  You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger.  For this sample, you can use the api key "special-key" to test the authorization filters

http://swagger.io/terms/[Terms Of Service]

http://www.apache.org/licenses/LICENSE-2.0.html[Apache 2.0]

https://swagger.io[Find more info here]

== Tags
pet::
Pet Operations
+
http://swagger.io

user::
All about the Users

== Servers
=== __Server__: http://localhost:8000/v2/api

== Paths
=== __POST__ `/pet/add` Add a new pet to the store
.Responses
[%header,caption=,cols=".^2a,.^14a,.^4a"]
|===
<.<|Code


<.<|Description


<.<|Links



<.<|200


<.<|This is a sample

.Content
text/plain::
+

type: string

.Example
[source]
----
whoa!
----


<.<|No Links



<.<|405


<.<|Invalid input


<.<|No Links



|===
.Security
[%header,caption=,cols=".^3a,.^4a,.^13a"]
|===
<.<|Type


<.<|Name


<.<|Scopes



<.<|**oauth2**


<.<|petstore_auth


<.<|write:pets, read:pets



|===

=== __PUT__ `/pet` Update an existing pet
.Responses
[%header,caption=,cols=".^2a,.^14a,.^4a"]
|===
<.<|Code


<.<|Description


<.<|Links



<.<|400


<.<|Invalid ID supplied


<.<|No Links



<.<|404


<.<|Pet not found


<.<|No Links



<.<|405


<.<|Validation exception


<.<|No Links



|===
.Security
[%header,caption=,cols=".^3a,.^4a,.^13a"]
|===
<.<|Type


<.<|Name


<.<|Scopes



<.<|**oauth2**


<.<|petstore_auth


<.<|write:pets, read:pets



|===

=== __POST__ `/pet` Add a new pet to the store
.Responses
[%header,caption=,cols=".^2a,.^14a,.^4a"]
|===
<.<|Code


<.<|Description


<.<|Links



<.<|405


<.<|Invalid input


<.<|No Links



|===
.Security
[%header,caption=,cols=".^3a,.^4a,.^13a"]
|===
<.<|Type


<.<|Name


<.<|Scopes



<.<|**oauth2**


<.<|petstore_auth


<.<|write:pets, read:pets



|===

=== __GET__ `/pet/findByStatus` Finds Pets by status
Multiple status values can be provided with comma seperated strings

.Parameters
[%header,caption=,cols=".^2a,.^3a,.^10a,.^5a"]
|===
<.<|Type


<.<|Name


<.<|Description


<.<|Schema



<.<|**query**


<.<|**status** +
__optional__


<.<|Status values that need to be considered for filter


<.<|type: array



|===
.Responses
[%header,caption=,cols=".^2a,.^14a,.^4a"]
|===
<.<|Code


<.<|Description


<.<|Links



<.<|200


<.<|successful operation

.Content
application/json::
+

<<_components_schemas_PetArray,PetArray>>

application/xml::
+

<<_components_schemas_PetArray,PetArray>>


<.<|No Links



<.<|400


<.<|Invalid status value


<.<|No Links



|===
.Security
[%header,caption=,cols=".^3a,.^4a,.^13a"]
|===
<.<|Type


<.<|Name


<.<|Scopes



<.<|**oauth2**


<.<|petstore_auth


<.<|write:pets, read:pets



|===

=== __GET__ `/pet/findByTags` Finds Pets by tags
Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.

.Parameters
[%header,caption=,cols=".^2a,.^3a,.^10a,.^5a"]
|===
<.<|Type


<.<|Name


<.<|Description


<.<|Schema



<.<|**query**


<.<|**tags** +
__optional__


<.<|Tags to filter by


<.<|type: array



|===
.Responses
[%header,caption=,cols=".^2a,.^14a,.^4a"]
|===
<.<|Code


<.<|Description


<.<|Links



<.<|200


<.<|successful operation

.Content
application/json::
+

type: array

application/xml::
+

type: array


<.<|No Links



<.<|400


<.<|Invalid tag value


<.<|No Links



|===
.Security
[%header,caption=,cols=".^3a,.^4a,.^13a"]
|===
<.<|Type


<.<|Name


<.<|Scopes



<.<|**oauth2**


<.<|petstore_auth


<.<|write:pets, read:pets



|===

=== __GET__ `/pet/{petId}` Find pet by ID
Returns a pet when ID < 10.  ID > 10 or nonintegers will simulate API error conditions

.Parameters
[%header,caption=,cols=".^2a,.^3a,.^10a,.^5a"]
|===
<.<|Type


<.<|Name


<.<|Description


<.<|Schema



<.<|**path**


<.<|**petId** +
__required__


<.<|ID of pet that needs to be fetched


<.<|type: integer +
format: int64



|===
.Responses
[%header,caption=,cols=".^2a,.^14a,.^4a"]
|===
<.<|Code


<.<|Description


<.<|Links



<.<|200


<.<|successful operation

.Content
application/json::
+

<<_components_schemas_Pet,Pet>>

application/xml::
+

<<_components_schemas_Pet,Pet>>


<.<|No Links



<.<|400


<.<|Invalid ID supplied


<.<|No Links



<.<|404


<.<|Pet not found


<.<|No Links



|===
.Security
[%header,caption=,cols=".^3a,.^4a,.^13a"]
|===
<.<|Type


<.<|Name


<.<|Scopes



<.<|**apiKey**


<.<|api_key


<.<|

<.<|**oauth2**


<.<|petstore_auth


<.<|write:pets, read:pets



|===

=== __POST__ `/pet/{petId}` Updates a pet in the store with form data
.Parameters
[%header,caption=,cols=".^2a,.^3a,.^10a,.^5a"]
|===
<.<|Type


<.<|Name


<.<|Description


<.<|Schema



<.<|**path**


<.<|**petId** +
__required__


<.<|ID of pet that needs to be updated


<.<|type: string



|===
.Responses
[%header,caption=,cols=".^2a,.^14a,.^4a"]
|===
<.<|Code


<.<|Description


<.<|Links



<.<|405


<.<|Invalid input


<.<|No Links



|===
.Security
[%header,caption=,cols=".^3a,.^4a,.^13a"]
|===
<.<|Type


<.<|Name


<.<|Scopes



<.<|**oauth2**


<.<|petstore_auth


<.<|write:pets, read:pets



|===

=== __DELETE__ `/pet/{petId}` Deletes a pet
.Parameters
[%header,caption=,cols=".^2a,.^3a,.^10a,.^5a"]
|===
<.<|Type


<.<|Name


<.<|Description


<.<|Schema



<.<|**path**


<.<|**petId** +
__required__


<.<|Pet id to delete


<.<|type: integer +
format: int64



<.<|**header**


<.<|**api_key** +
__optional__


<.<|
<.<|type: string



|===
.Responses
[%header,caption=,cols=".^2a,.^14a,.^4a"]
|===
<.<|Code


<.<|Description


<.<|Links



<.<|400


<.<|Invalid pet value


<.<|No Links



|===
.Security
[%header,caption=,cols=".^3a,.^4a,.^13a"]
|===
<.<|Type


<.<|Name


<.<|Scopes



<.<|**oauth2**


<.<|petstore_auth


<.<|write:pets, read:pets



|===

=== __POST__ `/pet/{petId}/uploadImage` uploads an image
.Parameters
[%header,caption=,cols=".^2a,.^3a,.^10a,.^5a"]
|===
<.<|Type


<.<|Name


<.<|Description


<.<|Schema



<.<|**path**


<.<|**petId** +
__required__


<.<|ID of pet to update


<.<|type: integer +
format: int64



|===
.Responses
[%header,caption=,cols=".^2a,.^14a,.^4a"]
|===
<.<|Code


<.<|Description


<.<|Links



<.<|200


<.<|successful operation

.Content
application/json::
+

<<_components_schemas_ApiResponse,ApiResponse>>


<.<|No Links



|===
.Security
[%header,caption=,cols=".^3a,.^4a,.^13a"]
|===
<.<|Type


<.<|Name


<.<|Scopes



<.<|**oauth2**


<.<|petstore_auth


<.<|write:pets, read:pets



|===

=== __GET__ `/store/inventory` Returns pet inventories by status
Returns a map of status codes to quantities

.Responses
[%header,caption=,cols=".^2a,.^14a,.^4a"]
|===
<.<|Code


<.<|Description


<.<|Links



<.<|200


<.<|successful operation

.Content
application/json::
+

type: object

application/xml::
+

type: object


<.<|No Links



|===
.Security
[%header,caption=,cols=".^3a,.^4a,.^13a"]
|===
<.<|Type


<.<|Name


<.<|Scopes



<.<|**apiKey**


<.<|api_key


<.<|

|===

=== __POST__ `/store/order` Place an order for a pet
.Responses
[%header,caption=,cols=".^2a,.^14a,.^4a"]
|===
<.<|Code


<.<|Description


<.<|Links



<.<|200


<.<|successful operation

.Content
application/json::
+

<<_components_schemas_Order,Order>>

application/xml::
+

<<_components_schemas_Order,Order>>


<.<|No Links



<.<|400


<.<|Invalid Order


<.<|No Links



|===

=== __GET__ `/store/order/{orderId}` Find purchase order by ID
For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions

.Parameters
[%header,caption=,cols=".^2a,.^3a,.^10a,.^5a"]
|===
<.<|Type


<.<|Name


<.<|Description


<.<|Schema



<.<|**path**


<.<|**orderId** +
__required__


<.<|ID of pet that needs to be fetched


<.<|type: string



|===
.Responses
[%header,caption=,cols=".^2a,.^14a,.^4a"]
|===
<.<|Code


<.<|Description


<.<|Links



<.<|200


<.<|successful operation

.Content
application/json::
+

<<_components_schemas_Order,Order>>

application/xml::
+

<<_components_schemas_Order,Order>>


<.<|No Links



<.<|400


<.<|Invalid ID supplied


<.<|No Links



<.<|404


<.<|Order not found


<.<|No Links



|===

=== __DELETE__ `/store/order/{orderId}` Delete purchase order by ID
For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors

.Parameters
[%header,caption=,cols=".^2a,.^3a,.^10a,.^5a"]
|===
<.<|Type


<.<|Name


<.<|Description


<.<|Schema



<.<|**path**


<.<|**orderId** +
__required__


<.<|ID of the order that needs to be deleted


<.<|type: string



|===
.Responses
[%header,caption=,cols=".^2a,.^14a,.^4a"]
|===
<.<|Code


<.<|Description


<.<|Links



<.<|400


<.<|Invalid ID supplied


<.<|No Links



<.<|404


<.<|Order not found


<.<|No Links



|===

=== __POST__ `/user` Create user
This can only be done by the logged in user.

.Responses
[%header,caption=,cols=".^2a,.^14a,.^4a"]
|===
<.<|Code


<.<|Description


<.<|Links



<.<|200


<.<|.Content
application/json::
+

type: object

.Properties
[%header,caption=,cols=".^4a,.^16a"]
!===
<.<!Name

<.<!Schema

<.<!id
__optional__

<.<!type: string +
format: text

!===
.Examples
foo::
+
.Example
[source]
----
{"foo":"bar"}
----

bar::
+
.Example
[source]
----
{"bar":"baz"}
----


<.<|No Links



<.<|default


<.<|successful operation


<.<|No Links



|===

=== __POST__ `/user/createWithArray` Creates list of users with given input array
.Responses
[%header,caption=,cols=".^2a,.^14a,.^4a"]
|===
<.<|Code


<.<|Description


<.<|Links



<.<|default


<.<|successful operation


<.<|No Links



|===

=== __POST__ `/user/createWithList` Creates list of users with given input array
.Responses
[%header,caption=,cols=".^2a,.^14a,.^4a"]
|===
<.<|Code


<.<|Description


<.<|Links



<.<|default


<.<|successful operation


<.<|No Links



|===

=== __GET__ `/user/login` Logs user into the system
.Parameters
[%header,caption=,cols=".^2a,.^3a,.^10a,.^5a"]
|===
<.<|Type


<.<|Name


<.<|Description


<.<|Schema



<.<|**query**


<.<|**password** +
__optional__


<.<|The password for login in clear text


<.<|type: string



<.<|**query**


<.<|**username** +
__optional__


<.<|The user name for login


<.<|type: string



|===
.Responses
[%header,caption=,cols=".^2a,.^14a,.^4a"]
|===
<.<|Code


<.<|Description


<.<|Links



<.<|200


<.<|successful operation

.Content
application/json::
+

type: string

application/xml::
+

type: string


<.<|No Links



<.<|400


<.<|Invalid username/password supplied


<.<|No Links



|===

=== __GET__ `/user/logout` Logs out current logged in user session
.Responses
[%header,caption=,cols=".^2a,.^14a,.^4a"]
|===
<.<|Code


<.<|Description


<.<|Links



<.<|default


<.<|successful operation


<.<|No Links



|===

=== __GET__ `/user/{username}` Get user by user name
.Parameters
[%header,caption=,cols=".^2a,.^3a,.^10a,.^5a"]
|===
<.<|Type


<.<|Name


<.<|Description


<.<|Schema



<.<|**path**


<.<|**username** +
__required__


<.<|The name that needs to be fetched. Use user1 for testing.


<.<|type: string



|===
.Responses
[%header,caption=,cols=".^2a,.^14a,.^4a"]
|===
<.<|Code


<.<|Description


<.<|Links



<.<|200


<.<|successful operation

.Content
application/json::
+

<<_components_schemas_User,User>>

application/xml::
+

<<_components_schemas_User,User>>


<.<|No Links



<.<|400


<.<|Invalid username supplied


<.<|No Links



<.<|404


<.<|User not found


<.<|No Links



|===

=== __PUT__ `/user/{username}` Updated user
This can only be done by the logged in user.

.Parameters
[%header,caption=,cols=".^2a,.^3a,.^10a,.^5a"]
|===
<.<|Type


<.<|Name


<.<|Description


<.<|Schema



<.<|**path**


<.<|**username** +
__required__


<.<|name that need to be deleted


<.<|type: string



|===
.Responses
[%header,caption=,cols=".^2a,.^14a,.^4a"]
|===
<.<|Code


<.<|Description


<.<|Links



<.<|400


<.<|Invalid user supplied


<.<|No Links



<.<|404


<.<|User not found


<.<|No Links



|===

=== __DELETE__ `/user/{username}` Delete user
This can only be done by the logged in user.

.Parameters
[%header,caption=,cols=".^2a,.^3a,.^10a,.^5a"]
|===
<.<|Type


<.<|Name


<.<|Description


<.<|Schema



<.<|**path**


<.<|**username** +
__required__


<.<|The name that needs to be deleted


<.<|type: string



|===
.Responses
[%header,caption=,cols=".^2a,.^14a,.^4a"]
|===
<.<|Code


<.<|Description


<.<|Links



<.<|400


<.<|Invalid username supplied


<.<|No Links



<.<|404


<.<|User not found


<.<|No Links



|===

[[_components]]
== Components
[[_components_schemas]]
=== Schemas
[[_components_schemas_user]]
==== User

.Properties
[%header,caption=,cols=".^4a,.^16a"]
|===
<.<|Name


<.<|Schema



<.<|id
__optional__


<.<|type: integer +
format: int64



<.<|username
__optional__


<.<|type: string



<.<|firstName
__optional__


<.<|type: string



<.<|lastName
__optional__


<.<|type: string



<.<|email
__optional__


<.<|type: string



<.<|password
__optional__


<.<|type: string



<.<|phone
__optional__


<.<|type: string



<.<|userStatus
__optional__


<.<|User Status

type: integer +
format: int32



|===
[[_components_schemas_category]]
==== Category

.Properties
[%header,caption=,cols=".^4a,.^16a"]
|===
<.<|Name


<.<|Schema



<.<|id
__optional__


<.<|type: integer +
format: int64



<.<|name
__optional__


<.<|type: string



|===
[[_components_schemas_pet]]
==== Pet

.Properties
[%header,caption=,cols=".^4a,.^16a"]
|===
<.<|Name


<.<|Schema



<.<|id
__optional__


<.<|type: integer +
format: int64



<.<|category
__optional__


<.<|<<_components_schemas_Category,Category>>



<.<|name
__required__


<.<|type: string



<.<|photoUrls
__required__


<.<|type: array



<.<|tags
__optional__


<.<|type: array



<.<|status
__optional__


<.<|pet status in the store

type: string



|===
[[_components_schemas_tag]]
==== Tag

.Properties
[%header,caption=,cols=".^4a,.^16a"]
|===
<.<|Name


<.<|Schema



<.<|id
__optional__


<.<|type: integer +
format: int64



<.<|name
__optional__


<.<|type: string



|===
[[_components_schemas_order]]
==== Order

.Properties
[%header,caption=,cols=".^4a,.^16a"]
|===
<.<|Name


<.<|Schema



<.<|id
__optional__


<.<|type: integer +
format: int64



<.<|petId
__optional__


<.<|type: integer +
format: int64



<.<|quantity
__optional__


<.<|type: integer +
format: int32



<.<|shipDate
__optional__


<.<|type: string +
format: date-time



<.<|status
__optional__


<.<|Order Status

type: string



<.<|complete
__optional__


<.<|type: boolean



|===
[[_components_schemas_petarray]]
==== PetArray

type: array

.Responses
[%header,caption=,cols=".^2a,.^14a,.^4a"]
|===
<.<|Code


<.<|Description


<.<|Links



<.<|veryBad


<.<|failed


<.<|No Links



|===

== Security
[%header,caption=,cols=".^3a,.^4a,.^13a"]
|===
<.<|Type


<.<|Name


<.<|Scopes



<.<|**oauth2**


<.<|foo


<.<|bar, baz



<.<|**oauth2**


<.<|a


<.<|b, c



|===

