Skip to content

Instantly share code, notes, and snippets.

@gthieleb
Created July 30, 2020 22:38
Show Gist options
  • Save gthieleb/a6094f05d4a3513be23712ebad7d8820 to your computer and use it in GitHub Desktop.
Save gthieleb/a6094f05d4a3513be23712ebad7d8820 to your computer and use it in GitHub Desktop.
petstore schema
openapi: 3.0.3
info:
title: ''
version: 0.0.0
paths:
/api/animals/:
get:
operationId: api_animals_list
description: ''
tags:
- api
security:
- cookieAuth: []
- basicAuth: []
- {}
responses:
'200':
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Animal'
description: ''
post:
operationId: api_animals_create
description: ''
tags:
- api
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Animal'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/Animal'
multipart/form-data:
schema:
$ref: '#/components/schemas/Animal'
required: true
security:
- cookieAuth: []
- basicAuth: []
- {}
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/Animal'
description: ''
/api/animals/{id}/:
get:
operationId: api_animals_retrieve
description: ''
parameters:
- in: path
name: id
schema:
type: integer
description: A unique integer value identifying this animal.
required: true
tags:
- api
security:
- cookieAuth: []
- basicAuth: []
- {}
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/Animal'
description: ''
put:
operationId: api_animals_update
description: ''
parameters:
- in: path
name: id
schema:
type: integer
description: A unique integer value identifying this animal.
required: true
tags:
- api
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Animal'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/Animal'
multipart/form-data:
schema:
$ref: '#/components/schemas/Animal'
required: true
security:
- cookieAuth: []
- basicAuth: []
- {}
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/Animal'
description: ''
patch:
operationId: api_animals_partial_update
description: ''
parameters:
- in: path
name: id
schema:
type: integer
description: A unique integer value identifying this animal.
required: true
tags:
- api
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/PatchedAnimal'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/PatchedAnimal'
multipart/form-data:
schema:
$ref: '#/components/schemas/PatchedAnimal'
security:
- cookieAuth: []
- basicAuth: []
- {}
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/Animal'
description: ''
delete:
operationId: api_animals_destroy
description: ''
parameters:
- in: path
name: id
schema:
type: integer
description: A unique integer value identifying this animal.
required: true
tags:
- api
security:
- cookieAuth: []
- basicAuth: []
- {}
responses:
'204':
description: No response body
/api/breeds/:
get:
operationId: api_breeds_list
description: ''
tags:
- api
security:
- cookieAuth: []
- basicAuth: []
- {}
responses:
'200':
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Breed'
description: ''
post:
operationId: api_breeds_create
description: ''
tags:
- api
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Breed'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/Breed'
multipart/form-data:
schema:
$ref: '#/components/schemas/Breed'
required: true
security:
- cookieAuth: []
- basicAuth: []
- {}
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/Breed'
description: ''
/api/breeds/{id}/:
get:
operationId: api_breeds_retrieve
description: ''
parameters:
- in: path
name: id
schema:
type: integer
description: A unique integer value identifying this breed.
required: true
tags:
- api
security:
- cookieAuth: []
- basicAuth: []
- {}
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/Breed'
description: ''
put:
operationId: api_breeds_update
description: ''
parameters:
- in: path
name: id
schema:
type: integer
description: A unique integer value identifying this breed.
required: true
tags:
- api
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Breed'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/Breed'
multipart/form-data:
schema:
$ref: '#/components/schemas/Breed'
required: true
security:
- cookieAuth: []
- basicAuth: []
- {}
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/Breed'
description: ''
patch:
operationId: api_breeds_partial_update
description: ''
parameters:
- in: path
name: id
schema:
type: integer
description: A unique integer value identifying this breed.
required: true
tags:
- api
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/PatchedBreed'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/PatchedBreed'
multipart/form-data:
schema:
$ref: '#/components/schemas/PatchedBreed'
security:
- cookieAuth: []
- basicAuth: []
- {}
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/Breed'
description: ''
delete:
operationId: api_breeds_destroy
description: ''
parameters:
- in: path
name: id
schema:
type: integer
description: A unique integer value identifying this breed.
required: true
tags:
- api
security:
- cookieAuth: []
- basicAuth: []
- {}
responses:
'204':
description: No response body
/api/pets/:
get:
operationId: api_pets_list
description: ''
tags:
- api
security:
- cookieAuth: []
- basicAuth: []
- {}
responses:
'200':
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Pet'
description: ''
post:
operationId: api_pets_create
description: ''
tags:
- api
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Pet'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/Pet'
multipart/form-data:
schema:
$ref: '#/components/schemas/Pet'
required: true
security:
- cookieAuth: []
- basicAuth: []
- {}
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/Pet'
description: ''
/api/pets/{id}/:
get:
operationId: api_pets_retrieve
description: ''
parameters:
- in: path
name: id
schema:
type: integer
description: A unique integer value identifying this pet.
required: true
tags:
- api
security:
- cookieAuth: []
- basicAuth: []
- {}
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/Pet'
description: ''
put:
operationId: api_pets_update
description: ''
parameters:
- in: path
name: id
schema:
type: integer
description: A unique integer value identifying this pet.
required: true
tags:
- api
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Pet'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/Pet'
multipart/form-data:
schema:
$ref: '#/components/schemas/Pet'
required: true
security:
- cookieAuth: []
- basicAuth: []
- {}
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/Pet'
description: ''
patch:
operationId: api_pets_partial_update
description: ''
parameters:
- in: path
name: id
schema:
type: integer
description: A unique integer value identifying this pet.
required: true
tags:
- api
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/PatchedPet'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/PatchedPet'
multipart/form-data:
schema:
$ref: '#/components/schemas/PatchedPet'
security:
- cookieAuth: []
- basicAuth: []
- {}
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/Pet'
description: ''
delete:
operationId: api_pets_destroy
description: ''
parameters:
- in: path
name: id
schema:
type: integer
description: A unique integer value identifying this pet.
required: true
tags:
- api
security:
- cookieAuth: []
- basicAuth: []
- {}
responses:
'204':
description: No response body
components:
schemas:
Animal:
type: object
properties:
id:
type: integer
readOnly: true
name:
type: string
maxLength: 60
scientific_name:
type: string
nullable: true
maxLength: 60
required:
- id
- name
Breed:
type: object
properties:
id:
type: integer
readOnly: true
name:
type: string
maxLength: 50
animal:
type: integer
required:
- animal
- id
- name
PatchedAnimal:
type: object
properties:
id:
type: integer
readOnly: true
name:
type: string
maxLength: 60
scientific_name:
type: string
nullable: true
maxLength: 60
PatchedBreed:
type: object
properties:
id:
type: integer
readOnly: true
name:
type: string
maxLength: 50
animal:
type: integer
PatchedPet:
type: object
properties:
id:
type: integer
readOnly: true
name:
type: string
maxLength: 30
breed:
type: integer
birthday:
type: string
format: date
Pet:
type: object
properties:
id:
type: integer
readOnly: true
name:
type: string
maxLength: 30
breed:
type: integer
birthday:
type: string
format: date
required:
- birthday
- breed
- id
- name
securitySchemes:
basicAuth:
type: http
scheme: basic
cookieAuth:
type: apiKey
in: cookie
name: Sessio
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment