121 lines
3.2 KiB
YAML
121 lines
3.2 KiB
YAML
|
/materials:
|
||
|
get:
|
||
|
summary: lists all materials
|
||
|
description: 'Auth: all, levels: read, write, maintain, dev, admin'
|
||
|
tags:
|
||
|
- /material
|
||
|
responses:
|
||
|
200:
|
||
|
description: all material details
|
||
|
content:
|
||
|
application/json:
|
||
|
schema:
|
||
|
type: array
|
||
|
items:
|
||
|
$ref: 'api.yaml#/components/schemas/Material'
|
||
|
401:
|
||
|
$ref: 'api.yaml#/components/responses/401'
|
||
|
500:
|
||
|
$ref: 'api.yaml#/components/responses/500'
|
||
|
|
||
|
/material/{id}:
|
||
|
parameters:
|
||
|
- $ref: 'api.yaml#/components/parameters/Id'
|
||
|
get:
|
||
|
summary: get material details
|
||
|
description: 'Auth: all, levels: read, write, maintain, dev, admin'
|
||
|
tags:
|
||
|
- /material
|
||
|
responses:
|
||
|
200:
|
||
|
description: material details
|
||
|
content:
|
||
|
application/json:
|
||
|
schema:
|
||
|
$ref: 'api.yaml#/components/schemas/Material'
|
||
|
401:
|
||
|
$ref: 'api.yaml#/components/responses/401'
|
||
|
404:
|
||
|
$ref: 'api.yaml#/components/responses/404'
|
||
|
500:
|
||
|
$ref: 'api.yaml#/components/responses/500'
|
||
|
put:
|
||
|
summary: TODO change material
|
||
|
description: 'Auth: basic, levels: write, maintain, dev, admin'
|
||
|
tags:
|
||
|
- /material
|
||
|
security:
|
||
|
- BasicAuth: []
|
||
|
requestBody:
|
||
|
required: true
|
||
|
content:
|
||
|
application/json:
|
||
|
schema:
|
||
|
$ref: 'api.yaml#/components/schemas/Material'
|
||
|
responses:
|
||
|
200:
|
||
|
description: material details
|
||
|
content:
|
||
|
application/json:
|
||
|
schema:
|
||
|
$ref: 'api.yaml#/components/schemas/Material'
|
||
|
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'
|
||
|
delete:
|
||
|
summary: TODO delete material
|
||
|
description: 'Auth: basic, levels: write, maintain, dev, admin'
|
||
|
tags:
|
||
|
- /material
|
||
|
security:
|
||
|
- BasicAuth: []
|
||
|
responses:
|
||
|
200:
|
||
|
$ref: 'api.yaml#/components/responses/Ok'
|
||
|
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'
|
||
|
|
||
|
/material/new:
|
||
|
post:
|
||
|
summary: TODO add material
|
||
|
description: 'Auth: basic, levels: write, maintain, dev, admin'
|
||
|
tags:
|
||
|
- /material
|
||
|
security:
|
||
|
- BasicAuth: []
|
||
|
requestBody:
|
||
|
required: true
|
||
|
content:
|
||
|
application/json:
|
||
|
schema:
|
||
|
$ref: 'api.yaml#/components/schemas/Material'
|
||
|
responses:
|
||
|
200:
|
||
|
description: material details
|
||
|
content:
|
||
|
application/json:
|
||
|
schema:
|
||
|
$ref: 'api.yaml#/components/schemas/Material'
|
||
|
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'
|