# Swagger Petstore YAML

Version: `1.0.0`

OpenAPI specification: https://redocly.com/_spec/docs/openapi/petstore.json

Terms of service: http://swagger.io/terms/

Contact: API Support, apiteam@swagger.io, https://github.com/Redocly/redoc

License: Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0.html)

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.

## Introduction
This API is documented in **OpenAPI format** and is based on
[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.
It was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)
tool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard
OpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).

## OpenAPI Specification
This API is documented in **OpenAPI format** and is based on
[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.
It was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)
tool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard
OpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).

## Cross-Origin Resource Sharing
This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with  [W3C spec](https://www.w3.org/TR/cors/).
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.

## Authentication

Petstore offers two forms of authentication:
  - API Key
  - OAuth2
OAuth2 - an open protocol to allow secure authorization in a simple
and standard method from web, mobile and desktop applications.

## Authentication

- `petstore_auth`: OAuth 2.0: implicit (authorization URL http://petstore.swagger.io/api/oauth/dialog). Get access to data while protecting your account credentials.
OAuth2 is also a safer and more secure way to give you access.
- `api_key`: API key in header `api_key`. For this sample, you can use the api key `special-key` to test the authorization filters.

## Operations

- [Add a new pet to the store](/petstore_versioned/1.0.0/add-pet.md): `POST /pet`
- [Update an existing pet](/petstore_versioned/1.0.0/update-pet.md): `PUT /pet`
- [Find pet by ID](/petstore_versioned/1.0.0/get-pet-by-id.md): `GET /pet/{petId}`
- [Updates a pet in the store with form data](/petstore_versioned/1.0.0/update-pet-with-form.md): `POST /pet/{petId}`
- [Deletes a pet](/petstore_versioned/1.0.0/delete-pet.md): `DELETE /pet/{petId}`
- [uploads an image](/petstore_versioned/1.0.0/upload-file.md): `POST /pet/{petId}/uploadImage`
- [Finds Pets by status](/petstore_versioned/1.0.0/find-pets-by-status.md): `GET /pet/findByStatus`
- [Finds Pets by tags](/petstore_versioned/1.0.0/find-pets-by-tags.md): `GET /pet/findByTags`
- [Returns pet inventories by status](/petstore_versioned/1.0.0/get-inventory.md): `GET /store/inventory`
- [Place an order for a pet](/petstore_versioned/1.0.0/place-order.md): `POST /store/order`
- [Find purchase order by ID](/petstore_versioned/1.0.0/get-order-by-id.md): `GET /store/order/{orderId}`
- [Delete purchase order by ID](/petstore_versioned/1.0.0/delete-order.md): `DELETE /store/order/{orderId}`
- [Subscribe to the Store events](/petstore_versioned/1.0.0/subscribe-to-the-store-events.md): `POST /store/subscribe`
- [Create user](/petstore_versioned/1.0.0/create-user.md): `POST /user`
- [Get user by user name](/petstore_versioned/1.0.0/get-user-by-name.md): `GET /user/{username}`
- [Updated user](/petstore_versioned/1.0.0/update-user.md): `PUT /user/{username}`
- [Delete user](/petstore_versioned/1.0.0/delete-user.md): `DELETE /user/{username}`
- [Creates list of users with given input array](/petstore_versioned/1.0.0/create-users-with-array-input.md): `POST /user/createWithArray`
- [Creates list of users with given input list](/petstore_versioned/1.0.0/create-users-with-list-input.md): `POST /user/createWithList`
- [Logs user into the system](/petstore_versioned/1.0.0/login-user.md): `GET /user/login`
- [Logs out current logged in user session](/petstore_versioned/1.0.0/logout-user.md): `GET /user/logout`
- [New pet](/petstore_versioned/1.0.0/new-pet.md): `webhook`
