Swagger Petstore (1.0.0)

Download OpenAPI specification:Download

This is a sample server for a pet store.

pets

Operations related to pets

List all pets

Retrieves a list of all pets, with pagination options.

query Parameters
limit
integer <int32> <= 100

How many items to return at one time (max 100)

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a pet

Creates a new pet in the store.

Request Body schema: application/json
id
required
integer <int64>
name
required
string
tag
string

Responses

Request samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "tag": "string"
}

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string"
}

Info for a specific pet

Retrieves information about a specific pet by ID.

path Parameters
petId
required
string

The id of the pet to retrieve

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "tag": "string"
}