liznetsov.swagger-tools.demo-webmvc.0.5.4.source-code.petstore.yaml Maven / Gradle / Ivy
openapi: 3.0.1
info:
title: Swagger Petstore
license:
name: MIT
version: 1.0.0
servers:
- url: /v1
paths:
/hidden:
get:
tags:
- pets
operationId: hiddenOp
responses:
200:
description: OK
content: {}
x-ignore: true
/pets:
get:
tags:
- pets
summary: List all pets
operationId: listPets
parameters:
- name: limit
in: query
description: How many items to return at one time (max 100)
schema:
type: integer
format: int32
responses:
200:
description: An paged array of pets
content:
'application/json':
schema:
type: array
items:
$ref: '#/components/schemas/Pet'
post:
tags:
- pets
summary: Create a pet
operationId: createPet
requestBody:
content:
'application/json':
schema:
$ref: '#/components/schemas/Pet'
required: false
responses:
201:
description: Created
content:
'application/json':
schema:
$ref: '#/components/schemas/Pet'
/pets/{petId}:
get:
tags:
- pets
summary: Info for a specific pet
operationId: getPetById
parameters:
- name: petId
in: path
description: The id of the pet to retrieve
required: true
schema:
type: integer
format: int64
- name: details
in: query
description: Include pet details
schema:
type: boolean
default: false
responses:
200:
description: Expected response to a valid request
content:
'application/json':
schema:
$ref: '#/components/schemas/Pet'
put:
tags:
- pets
summary: Update a pet
operationId: updatePet
parameters:
- name: petId
in: path
description: The id of the pet to retrieve
required: true
schema:
type: integer
format: int64
requestBody:
content:
'application/json':
schema:
$ref: '#/components/schemas/Pet'
required: false
responses:
204:
description: OK
content: {}
delete:
tags:
- pets
summary: Info for a specific pet
operationId: deletePetById
parameters:
- name: petId
in: path
required: true
schema:
type: integer
format: int64
responses:
204:
description: Deleted
content: {}
'/pets/{petId}/events':
get:
tags:
- pets
operationId: getPetEvents
parameters:
- name: petId
in: path
required: true
schema:
type: integer
format: int64
responses:
'200':
description: OK
content:
text/event-stream:
schema:
type: string
components:
schemas:
Pets:
type: array
items:
$ref: '#/components/schemas/Pet'
Owner:
type: object
properties:
name:
type: string
Cat:
description: A representation of a cat
allOf:
- $ref: '#/components/schemas/Pet'
- required:
- huntingSkill
type: object
properties:
huntingSkill:
type: string
description: The measured skill for hunting
default: lazy
enum:
- clueless
- lazy
- adventurous
- aggressive
Color:
type: string
enum:
- Black
- White
- Red
Error:
type: object
properties:
code:
type: integer
format: int32
message:
type: string
additionalProperties:
type: string
Dog:
description: A representation of a dog
allOf:
- $ref: '#/components/schemas/Pet'
- required:
- packSize
type: object
properties:
packSize:
minimum: 0
type: integer
description: the size of the pack the dog is from
format: int32
default: 0
Pet:
required:
- id
- name
type: object
properties:
_type:
type: string
id:
type: integer
format: int64
default: 0
name:
minLength: 3
type: string
default: noname
available:
type: boolean
default: true
price:
type: number
minimum: 0
uid:
type: string
format: uuid
createTime:
type: string
format: date-time
owner:
$ref: '#/components/schemas/Owner'
color:
$ref: '#/components/schemas/Color'
details:
type: object
additionalProperties:
type: string
thumbnail:
type: string
format: binary
discriminator:
propertyName: _type
PetList:
required:
- _items
type: object
properties:
_items:
type: array
items:
$ref: '#/components/schemas/Pet'
_max:
type: integer
_offset:
type: integer