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/schemas.yaml

187 lines
3.9 KiB
YAML
Raw Normal View History

2020-04-21 10:53:07 +02:00
Id:
type: string
2020-04-24 12:25:32 +02:00
example: 5ea0450ed851c30a90e70894
2020-04-21 10:53:07 +02:00
_Id:
properties:
_id:
allOf:
2020-04-29 12:10:27 +02:00
- $ref: 'api.yaml#/components/schemas/Id'
2020-04-21 10:53:07 +02:00
readOnly: true
Color:
properties:
color:
type: string
2020-04-29 12:10:27 +02:00
example: black
2020-04-21 10:53:07 +02:00
SampleProperties:
properties:
2020-05-06 14:39:04 +02:00
number:
2020-04-21 10:53:07 +02:00
type: string
2020-05-06 14:39:04 +02:00
example: Rng172
2020-04-21 10:53:07 +02:00
type:
type: string
2020-05-06 14:39:04 +02:00
example: granulate
2020-04-21 10:53:07 +02:00
batch:
type: string
2020-05-06 14:39:04 +02:00
example: 1560237365
2020-04-21 10:53:07 +02:00
2020-05-06 14:39:04 +02:00
SampleRefs:
2020-04-21 10:53:07 +02:00
allOf:
2020-04-29 12:10:27 +02:00
- $ref: 'api.yaml#/components/schemas/_Id'
- $ref: 'api.yaml#/components/schemas/Color'
- $ref: 'api.yaml#/components/schemas/SampleProperties'
2020-04-21 10:53:07 +02:00
properties:
material_id:
2020-04-29 12:10:27 +02:00
$ref: 'api.yaml#/components/schemas/Id'
2020-04-21 10:53:07 +02:00
note_id:
2020-04-29 12:10:27 +02:00
$ref: 'api.yaml#/components/schemas/Id'
2020-04-21 10:53:07 +02:00
user_id:
2020-04-29 12:10:27 +02:00
$ref: 'api.yaml#/components/schemas/Id'
2020-04-21 10:53:07 +02:00
Sample:
allOf:
2020-04-29 12:10:27 +02:00
- $ref: 'api.yaml#/components/schemas/_Id'
- $ref: 'api.yaml#/components/schemas/Color'
- $ref: 'api.yaml#/components/schemas/SampleProperties'
2020-04-21 10:53:07 +02:00
properties:
2020-05-06 14:39:04 +02:00
material_id:
allOf:
- $ref: 'api.yaml#/components/schemas/Id'
2020-04-21 10:53:07 +02:00
notes:
type: object
properties:
2020-05-06 14:39:04 +02:00
comment:
2020-04-21 10:53:07 +02:00
type: string
sample_references:
type: array
items:
2020-05-06 14:39:04 +02:00
properties:
id:
$ref: 'api.yaml#/components/schemas/Id'
relation:
type: string
example: part to this sample
2020-04-21 10:53:07 +02:00
SampleDetail:
allOf:
2020-04-29 12:10:27 +02:00
- $ref: 'api.yaml#/components/schemas/_Id'
- $ref: 'api.yaml#/components/schemas/Color'
- $ref: 'api.yaml#/components/schemas/SampleProperties'
2020-04-21 10:53:07 +02:00
properties:
material:
2020-04-29 12:10:27 +02:00
$ref: 'api.yaml#/components/schemas/Material'
2020-04-21 10:53:07 +02:00
notes:
type: object
properties:
2020-05-06 14:39:04 +02:00
comment:
2020-04-21 10:53:07 +02:00
type: string
sample_references:
type: array
items:
2020-04-29 12:10:27 +02:00
$ref: 'api.yaml#/components/schemas/Id'
2020-04-21 10:53:07 +02:00
conditions:
type: array
items:
2020-04-29 12:10:27 +02:00
$ref: 'api.yaml#/components/schemas/Condition'
2020-04-21 10:53:07 +02:00
Material:
allOf:
2020-04-29 12:10:27 +02:00
- $ref: 'api.yaml#/components/schemas/_Id'
2020-04-21 10:53:07 +02:00
properties:
2020-04-29 12:10:27 +02:00
name:
2020-04-21 10:53:07 +02:00
type: string
2020-04-29 12:10:27 +02:00
example: Stanyl TW 200 F8
2020-04-21 10:53:07 +02:00
supplier:
type: string
2020-04-29 12:10:27 +02:00
example: DSM
group:
2020-04-21 10:53:07 +02:00
type: string
2020-04-29 12:10:27 +02:00
example: PA46
2020-04-21 10:53:07 +02:00
mineral:
type: number
2020-04-29 12:10:27 +02:00
example: 0
2020-04-21 10:53:07 +02:00
glass_fiber:
type: number
2020-04-29 12:10:27 +02:00
example: 40
2020-04-21 10:53:07 +02:00
carbon_fiber:
type: number
2020-04-29 12:10:27 +02:00
example: 0
numbers:
type: array
items:
type: object
allOf:
- $ref: 'api.yaml#/components/schemas/Color'
properties:
number:
type: number
example: 5514263423
2020-04-21 10:53:07 +02:00
Condition:
allOf:
2020-04-29 12:10:27 +02:00
- $ref: 'api.yaml#/components/schemas/_Id'
2020-04-21 10:53:07 +02:00
properties:
sample_id:
2020-04-29 12:10:27 +02:00
$ref: 'api.yaml#/components/schemas/Id'
2020-05-08 14:41:31 +02:00
number:
type: string
example: B1
2020-04-21 10:53:07 +02:00
parameters:
type: object
treatment_template:
2020-04-29 12:10:27 +02:00
$ref: 'api.yaml#/components/schemas/Id'
2020-04-21 10:53:07 +02:00
Measurement:
allOf:
2020-04-29 12:10:27 +02:00
- $ref: 'api.yaml#/components/schemas/_Id'
2020-04-21 10:53:07 +02:00
properties:
condition_id:
2020-04-29 12:10:27 +02:00
$ref: 'api.yaml#/components/schemas/Id'
2020-04-21 10:53:07 +02:00
values:
type: object
measurement_template:
2020-04-29 12:10:27 +02:00
$ref: 'api.yaml#/components/schemas/Id'
2020-04-21 10:53:07 +02:00
Template:
allOf:
2020-04-29 12:10:27 +02:00
- $ref: 'api.yaml#/components/schemas/_Id'
2020-04-21 10:53:07 +02:00
properties:
name:
type: string
parameters:
type: array
items:
type: object
properties:
name:
type: string
range:
type: object
Email:
properties:
email:
type: string
example: john.doe@bosch.com
2020-04-23 17:46:00 +02:00
UserName:
properties:
name:
type: string
example: johndoe
2020-04-21 10:53:07 +02:00
User:
allOf:
2020-04-29 12:10:27 +02:00
- $ref: 'api.yaml#/components/schemas/_Id'
- $ref: 'api.yaml#/components/schemas/UserName'
- $ref: 'api.yaml#/components/schemas/Email'
2020-04-21 10:53:07 +02:00
properties:
pass:
type: string
writeOnly: true
example: Abc123!#
level:
type: string
example: read
2020-04-21 10:53:07 +02:00
location:
type: string
example: Rng
device_name:
type: string
example: Alpha II