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

205 lines
4.3 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-18 09:58:15 +02:00
readOnly: true
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
condition:
type: object
properties:
condition_template:
$ref: 'api.yaml#/components/schemas/Id'
example:
condition_template: 5ea0450ed851c30a90e70894
material: hot air
weeks: 5
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:
sample_id:
2020-05-06 14:39:04 +02:00
$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:
allOf:
- $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'
measurements:
2020-04-21 10:53:07 +02:00
type: array
items:
allOf:
- $ref: 'api.yaml#/components/schemas/Measurement'
user:
type: string
example: admin
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: string
2020-04-29 12:10:27 +02:00
example: 5514263423
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
2020-05-13 17:28:18 +02:00
example: humidity
version:
type: number
readOnly: true
example: 1
2020-04-21 10:53:07 +02:00
parameters:
type: array
items:
type: object
properties:
name:
type: string
2020-05-13 17:28:18 +02:00
example: kf
2020-04-21 10:53:07 +02:00
range:
type: object
2020-05-13 17:28:18 +02:00
example:
min: 0
max: 2
ConditionTemplate:
2020-05-13 17:28:18 +02:00
allOf:
- $ref: 'api.yaml#/components/schemas/Template'
properties:
number_prefix:
type: string
example: B
2020-04-21 10:53:07 +02:00
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