openapi: 3.0.1
info:
title: ""
version: ""
paths:
/cats:
get:
summary: Get all cats.
responses:
200:
description: ""
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Cat'
400:
$ref: '#/components/responses/Error400'
401:
$ref: '#/components/responses/Error401'
405:
$ref: '#/components/responses/Error405'
500:
$ref: '#/components/responses/Error500'
/cats/{id}:
get:
description: "Get a cat by its id."
parameters:
- name: id
in: path
required: true
schema: {}
responses:
200:
description: ""
content:
application/json:
schema:
$ref: '#/components/schemas/Cat'
400:
$ref: '#/components/responses/Error400'
401:
$ref: '#/components/responses/Error401'
405:
$ref: '#/components/responses/Error405'
500:
$ref: '#/components/responses/Error500'
components:
schemas:
Cat:
description: Type “Cat”.
type: object
required: [id, name]
properties:
id:
type: integer
example: 1
name:
type: string
example: "Tom"
responses:
Error400:
description: ""
content:
application/json:
schema: {}
Error401:
description: ""
content:
application/json:
schema: {}
Error405:
description: ""
content:
application/json:
schema: {}
Error500:
description: ""
content:
application/json:
schema: {}