swagger OK resopnse bodies

This commit is contained in:
breel
2020-08-09 22:23:39 -06:00
parent f11261f0da
commit 4aea3dab40
9 changed files with 288 additions and 80 deletions

View File

@@ -0,0 +1,44 @@
paths:
summary: "Interact with all entities within a namespace"
get:
description: "Get names and IDs of all entities"
tags:
- entities
parameters:
- $ref: "#/components/parameters/token"
responses:
200:
content:
applicaiton/json:
schema:
type: array
items:
type: object
properties:
Name: string
ID: string
example:
Name: John Smith
ID: abc-123
post:
description: "Create a new entity"
tags:
- entities
parameters:
- $ref: "#/components/parameters/token"
requestBody:
$ref: "#/components/schemas/requestOne"
responses:
200:
$ref: "#/components/schemas/responseOne"
components:
parameters:
token:
$ref: "../swagger.yaml#/components/parameters/token"
schemas:
requestOne:
$ref: "../swagger.yaml#/components/schemas/requestOne"
responseOne:
$ref: "../swagger.yaml#/components/schemas/responseOne"