update methods and immutable attribute added

This commit is contained in:
2021-09-07 15:22:55 +02:00
parent 0afef9f3cd
commit 6470aa5358
10 changed files with 956 additions and 20 deletions

View File

@ -52,6 +52,27 @@ paths:
\$ref: '#/components/schemas/$table.name'
security:
- jwt: ['secret']
put:
tags: [ "$table.name" ]
summary: Update a ${table.name}
operationId: methods.update_${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" ]
@ -74,6 +95,35 @@ paths:
\$ref: '#/components/schemas/$table.name'
security:
- jwt: ['secret']
#if (('immutable' not in $table) or (not $table.immutable))
put:
tags: [ "$table.name" ]
summary: Update a ${table.name}
operationId: methods.update_${table.name}
parameters:
- name: ${table.name}Id
in: path
required: true
schema:
type: integer
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']
#end if
#end for
components: