# Pets

## GET /pets

> List all pets

```json
{"openapi":"3.0.3","info":{"title":"GitBook Petstore API","version":"1.0.0"},"tags":[{"name":"pets"}],"servers":[{"url":"https://petstore.example.com/v1"}],"paths":{"/pets":{"get":{"summary":"List all pets","tags":["pets"],"operationId":"listPets","parameters":[{"name":"limit","in":"query","description":"Max items to return (100 default)","schema":{"type":"integer","maximum":100}}],"responses":{"200":{"description":"A paged array of pets","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Pets"}}}}}}}},"components":{"schemas":{"Pets":{"type":"array","items":{"$ref":"#/components/schemas/Pet"}},"Pet":{"type":"object","required":["id","name"],"properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"},"tag":{"type":"string"},"status":{"$ref":"#/components/schemas/PetStatus"}}},"PetStatus":{"type":"string","enum":["available","pending","sold"]}}}}
```

## POST /pets

> Create a pet

```json
{"openapi":"3.0.3","info":{"title":"GitBook Petstore API","version":"1.0.0"},"tags":[{"name":"pets"}],"servers":[{"url":"https://petstore.example.com/v1"}],"paths":{"/pets":{"post":{"summary":"Create a pet","tags":["pets"],"operationId":"createPets","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Pet"}}}},"responses":{"201":{"description":"Pet created"}}}}},"components":{"schemas":{"Pet":{"type":"object","required":["id","name"],"properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"},"tag":{"type":"string"},"status":{"$ref":"#/components/schemas/PetStatus"}}},"PetStatus":{"type":"string","enum":["available","pending","sold"]}}}}
```

## GET /pets/{petId}

> Info for a specific pet

```json
{"openapi":"3.0.3","info":{"title":"GitBook Petstore API","version":"1.0.0"},"tags":[{"name":"pets"}],"servers":[{"url":"https://petstore.example.com/v1"}],"paths":{"/pets/{petId}":{"get":{"summary":"Info for a specific pet","tags":["pets"],"operationId":"showPetById","parameters":[{"name":"petId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Pet response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Pet"}}}}},"deprecated":true}}},"components":{"schemas":{"Pet":{"type":"object","required":["id","name"],"properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"},"tag":{"type":"string"},"status":{"$ref":"#/components/schemas/PetStatus"}}},"PetStatus":{"type":"string","enum":["available","pending","sold"]}}}}
```
