Skip to content

Instantly share code, notes, and snippets.

@dtkav
Created September 3, 2020 23:45
Show Gist options
  • Save dtkav/3f4525af7aa7f95548c6fc2bac2eef1d to your computer and use it in GitHub Desktop.
Save dtkav/3f4525af7aa7f95548c6fc2bac2eef1d to your computer and use it in GitHub Desktop.
comma cat
openapi: 3.0.1
info:
title: test API
version: 2.0.0
license:
name: Apache 2.0
url: 'http://www.apache.org/licenses/LICENSE-2.0.html'
servers:
- url: '/api/v1/'
paths:
'/cat':
post:
operationId: createCat
requestBody:
content:
application/json:
schema:
"$ref": "#/components/schemas/Cat"
responses:
"201":
description: Created
content:
application/json:
schema:
"$ref": "#/components/schemas/Cat"
"400":
description: Bad Request
content:
application/json:
schema:
"$ref": "#/components/schemas/BadRequest"
components:
schemas:
Cat:
type: object
properties:
id:
type: string
name:
type: string
BadRequest:
type: object
properties:
message:
type: string
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment