Download OpenAPI specification:Download
Find out how to create Github repo for your OpenAPI spec.
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.
This API is documented in OpenAPI format and is based on Petstore sample provided by swagger.io team. It was extended to illustrate features of generator-openapi-repo tool and ReDoc documentation. In addition to standard OpenAPI syntax we use a few vendor extensions.
This API is documented in OpenAPI format and is based on Petstore sample provided by swagger.io team. It was extended to illustrate features of generator-openapi-repo tool and ReDoc documentation. In addition to standard OpenAPI syntax we use a few vendor extensions.
This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with W3C spec. And that allows cross-domain communication from the browser. All responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.
Petstore offers two forms of authentication:
OAuth2 - an open protocol to allow secure authorization in a simple and standard method from web, mobile and desktop applications.
Get access to data while protecting your account credentials. OAuth2 is also a safer and more secure way to give you access.
Security scheme type: | OAuth2 |
---|---|
implicit OAuth Flow | Authorization URL: http://petstore.swagger.io/api/oauth/dialog Scopes:
|
Add new pet to the store inventory.
Authorizations: |
cookieParam required | integer <int64> Some cookie |
category | object (Category) Categories this pet belongs to |
name required | string The name given to a pet |
photoUrls required | Array of string The list of URL to a cute photos featuring pet |
friend | object (Pet) Recursive |
tags | Array of object Tags attached to the pet |
status | string Enum:"available" "pending" "sold" Pet status in the store |
petType | string Type of a pet cat |
huntingSkill required | string Default: "lazy" Enum:"clueless" "lazy" "adventurous" "aggressive" The measured skill for hunting |
Invalid input
Authorizations: |
cookieParam required | integer <int64> Some cookie |
category | object (Category) Categories this pet belongs to |
name required | string The name given to a pet |
photoUrls required | Array of string The list of URL to a cute photos featuring pet |
friend | object (Pet) Recursive |
tags | Array of object Tags attached to the pet |
status | string Enum:"available" "pending" "sold" Pet status in the store |
petType | string Type of a pet cat |
huntingSkill required | string Default: "lazy" Enum:"clueless" "lazy" "adventurous" "aggressive" The measured skill for hunting |
Invalid ID supplied
Pet not found
Validation exception
Returns a single pet
Authorizations: |
petId required | integer <int64> Deprecated ID of pet to return |
successful operation
Invalid ID supplied
Pet not found
Authorizations: |
petId required | integer <int64> ID of pet that needs to be updated |
name | string Updated name of the pet |
status | string Updated status of the pet |
Invalid input
Authorizations: |
petId required | integer <int64> Pet id to delete |
api_key | string Example: "Bearer <TOKEN>" |
Invalid pet value
Authorizations: |
petId required | integer <int64> ID of pet to update |
successful operation
Multiple status values can be provided with comma seperated strings
Authorizations: |
status required | Array of string Items Enum:"available" "pending" "sold" Status values that need to be considered for filter |
successful operation
Invalid status value
Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
Authorizations: |
tags required | Array of string Tags to filter by |
successful operation
Invalid tag value
Returns a map of status codes to quantities
Authorizations: |
successful operation
quantity | integer <int32> >= 1 Default: 1 |
shipDate | string <date-time> Estimated ship date |
status | string Enum:"placed" "approved" "delivered" Order Status |
complete | boolean Indicates whenever order was completed or not |
successful operation
Invalid Order
For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
orderId required | integer <int64> [ 1 .. 5 ] ID of pet that needs to be fetched |
successful operation
Invalid ID supplied
Order not found
For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
orderId required | string >= 1 ID of the order that needs to be deleted |
Invalid ID supplied
Order not found
This can only be done by the logged in user.
pet | object or object |
username | string >= 4 characters User supplied username |
firstName | string non-empty User first name |
lastName | string non-empty User last name |
string <email> User email address | |
password | string <password> >= 8 characters (?=.*[a-z])(?=.*[A-Z])(?=.*[0-9]) User password, MUST contain a mix of upper and lower case letters, as well as digits |
phone | string Nullable ^\+(?:[0-9]-?){6,14}[0-9]$ User phone number in international format |
userStatus | integer <int32> User status |
successful operation
username required | string The name that needs to be fetched. Use user1 for testing. |
successful operation
Invalid username supplied
User not found
This can only be done by the logged in user.
username required | string name that need to be deleted |
pet | object or object |
username | string >= 4 characters User supplied username |
firstName | string non-empty User first name |
lastName | string non-empty User last name |
string <email> User email address | |
password | string <password> >= 8 characters (?=.*[a-z])(?=.*[A-Z])(?=.*[0-9]) User password, MUST contain a mix of upper and lower case letters, as well as digits |
phone | string Nullable ^\+(?:[0-9]-?){6,14}[0-9]$ User phone number in international format |
userStatus | integer <int32> User status |
Invalid user supplied
User not found
This can only be done by the logged in user.
username required | string The name that needs to be deleted |
Invalid username supplied
User not found
pet | object or object |
username | string >= 4 characters User supplied username |
firstName | string non-empty User first name |
lastName | string non-empty User last name |
string <email> User email address | |
password | string <password> >= 8 characters (?=.*[a-z])(?=.*[A-Z])(?=.*[0-9]) User password, MUST contain a mix of upper and lower case letters, as well as digits |
phone | string Nullable ^\+(?:[0-9]-?){6,14}[0-9]$ User phone number in international format |
userStatus | integer <int32> User status |
successful operation
pet | object or object |
username | string >= 4 characters User supplied username |
firstName | string non-empty User first name |
lastName | string non-empty User last name |
string <email> User email address | |
password | string <password> >= 8 characters (?=.*[a-z])(?=.*[A-Z])(?=.*[0-9]) User password, MUST contain a mix of upper and lower case letters, as well as digits |
phone | string Nullable ^\+(?:[0-9]-?){6,14}[0-9]$ User phone number in international format |
userStatus | integer <int32> User status |
successful operation
username required | string The user name for login |
password required | string The password for login in clear text |
successful operation
Invalid username/password supplied