Archived
2
This repository has been archived on 2023-03-02. You can view files and clone it, but cannot push or open issues or pull requests.
definma-api/api/template.yaml

112 lines
3.0 KiB
YAML

/template/{collection}s:
parameters:
- $ref: 'api.yaml#/components/parameters/Collection'
get:
summary: all available templates
description: 'Auth: basic, levels: read, write, dev, admin'
tags:
- /template
security:
- BasicAuth: []
responses:
200:
description: list of templates
content:
application/json:
schema:
type: array
items:
$ref: 'api.yaml#/components/schemas/Template'
401:
$ref: 'api.yaml#/components/responses/401'
500:
$ref: 'api.yaml#/components/responses/500'
/template/{collection}/{id}:
parameters:
- $ref: 'api.yaml#/components/parameters/Collection'
- $ref: 'api.yaml#/components/parameters/Id'
get:
summary: template details
description: 'Auth: basic, levels: read, write, dev, admin'
tags:
- /template
security:
- BasicAuth: []
responses:
200:
description: template details
content:
application/json:
schema:
$ref: 'api.yaml#/components/schemas/Template'
401:
$ref: 'api.yaml#/components/responses/401'
404:
$ref: 'api.yaml#/components/responses/404'
500:
$ref: 'api.yaml#/components/responses/500'
put:
summary: change template
description: 'Auth: basic, levels: dev, admin'
x-doc: With a change a new version is set, resulting in a new template with a new id
tags:
- /template
security:
- BasicAuth: []
requestBody:
required: true
content:
application/json:
schema:
$ref: 'api.yaml#/components/schemas/Template'
responses:
200:
description: template details
content:
application/json:
schema:
$ref: 'api.yaml#/components/schemas/Template'
400:
$ref: 'api.yaml#/components/responses/400'
401:
$ref: 'api.yaml#/components/responses/401'
403:
$ref: 'api.yaml#/components/responses/403'
404:
$ref: 'api.yaml#/components/responses/404'
500:
$ref: 'api.yaml#/components/responses/500'
/template/{collection}/new:
parameters:
- $ref: 'api.yaml#/components/parameters/Collection'
post:
summary: add template
description: 'Auth: basic, levels: dev, admin'
tags:
- /template
security:
- BasicAuth: []
requestBody:
required: true
content:
application/json:
schema:
$ref: 'api.yaml#/components/schemas/Template'
responses:
200:
description: template details
content:
application/json:
schema:
$ref: 'api.yaml#/components/schemas/Template'
400:
$ref: 'api.yaml#/components/responses/400'
401:
$ref: 'api.yaml#/components/responses/401'
403:
$ref: 'api.yaml#/components/responses/403'
500:
$ref: 'api.yaml#/components/responses/500'