add post method to api

This commit is contained in:
2021-08-31 17:24:54 +02:00
parent e238b1fb9f
commit 6bb1eec181
5 changed files with 749 additions and 4 deletions

View File

@ -31,6 +31,27 @@ paths:
\$ref: '#/components/schemas/$table.name'
security:
- jwt: ['secret']
post:
tags: [ "$table.name" ]
summary: Insert a ${table.name}
operationId: methods.insert_${table.name}
requestBody:
description: $table.name
content:
application/json:
schema:
\$ref: '#/components/schemas/$table.name'
responses:
'200':
description: ${table.name} successfully inserted
content:
'application/json':
schema:
type: array
items:
\$ref: '#/components/schemas/$table.name'
security:
- jwt: ['secret']
/v1/${table.name}s/{${table.name}Id}:
get:
tags: [ "$table.name" ]