update methods and immutable attribute added
This commit is contained in:
@ -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:
|
||||
|
Reference in New Issue
Block a user