Overview
A sample API that uses a petstore as an example to demonstrate features in the swagger-2.0 specification
Version information
Version : 1.0.0
Contact information
Contact : Swagger API Team
Contact Email : apiteam@swagger.io
License information
License : Apache 2.0
License URL : https://www.apache.org/licenses/LICENSE-2.0.html
Terms of service : http://swagger.io/terms/
URI scheme
Host : petstore.swagger.io
BasePath : /api
Schemes : HTTP
Consumes
-
application/json
Produces
-
application/json
Paths
POST /pets
Description
Creates a new pet in the store. Duplicates are allowed
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Body |
pet |
Pet to add to the store |
GET /pets
Description
Returns all pets from the system that the user has access to
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Query |
limit |
maximum number of results to return |
integer (int32) |
Query |
tags |
tags to filter by |
< string > array(csv) |
GET /pets/{id}
Description
Returns a user based on a single ID, if the user does not have access to the pet
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
id |
ID of pet to fetch |
integer (int64) |
DELETE /pets/{id}
Description
deletes a single pet based on the ID supplied
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
id |
ID of pet to delete |
integer (int64) |
Responses
HTTP Code | Description | Schema |
---|---|---|
204 |
pet deleted |
No Content |
default |
unexpected error |
Definitions
Error
Name | Schema |
---|---|
code |
integer (int32) |
message |
string |
NewPet
Name | Schema |
---|---|
name |
string |
tag |
string |
Pet
Polymorphism : Composition
Name | Schema |
---|---|
id |
integer (int64) |
name |
string |
tag |
string |