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
2020-05-15 11:16:17 +02:00

205 lines
4.3 KiB
YAML

Id:
type: string
example: 5ea0450ed851c30a90e70894
_Id:
properties:
_id:
allOf:
- $ref: 'api.yaml#/components/schemas/Id'
readOnly: true
Color:
properties:
color:
type: string
example: black
SampleProperties:
properties:
number:
type: string
example: Rng172
type:
type: string
example: granulate
batch:
type: string
example: 1560237365
SampleRefs:
allOf:
- $ref: 'api.yaml#/components/schemas/_Id'
- $ref: 'api.yaml#/components/schemas/Color'
- $ref: 'api.yaml#/components/schemas/SampleProperties'
properties:
material_id:
$ref: 'api.yaml#/components/schemas/Id'
note_id:
$ref: 'api.yaml#/components/schemas/Id'
user_id:
$ref: 'api.yaml#/components/schemas/Id'
Sample:
allOf:
- $ref: 'api.yaml#/components/schemas/_Id'
- $ref: 'api.yaml#/components/schemas/Color'
- $ref: 'api.yaml#/components/schemas/SampleProperties'
properties:
material_id:
allOf:
- $ref: 'api.yaml#/components/schemas/Id'
notes:
type: object
properties:
comment:
type: string
sample_references:
type: array
items:
properties:
id:
$ref: 'api.yaml#/components/schemas/Id'
relation:
type: string
example: part to this sample
SampleDetail:
allOf:
- $ref: 'api.yaml#/components/schemas/_Id'
- $ref: 'api.yaml#/components/schemas/Color'
- $ref: 'api.yaml#/components/schemas/SampleProperties'
properties:
material:
$ref: 'api.yaml#/components/schemas/Material'
notes:
type: object
properties:
comment:
type: string
sample_references:
type: array
items:
$ref: 'api.yaml#/components/schemas/Id'
conditions:
type: array
items:
$ref: 'api.yaml#/components/schemas/Condition'
Material:
allOf:
- $ref: 'api.yaml#/components/schemas/_Id'
properties:
name:
type: string
example: Stanyl TW 200 F8
supplier:
type: string
example: DSM
group:
type: string
example: PA46
mineral:
type: number
example: 0
glass_fiber:
type: number
example: 40
carbon_fiber:
type: number
example: 0
numbers:
type: array
items:
type: object
allOf:
- $ref: 'api.yaml#/components/schemas/Color'
properties:
number:
type: number
example: 5514263423
Condition:
allOf:
- $ref: 'api.yaml#/components/schemas/_Id'
properties:
sample_id:
$ref: 'api.yaml#/components/schemas/Id'
number:
type: string
readOnly: true
example: B1
parameters:
type: object
treatment_template:
$ref: 'api.yaml#/components/schemas/Id'
Measurement:
allOf:
- $ref: 'api.yaml#/components/schemas/_Id'
properties:
condition_id:
$ref: 'api.yaml#/components/schemas/Id'
values:
type: object
measurement_template:
$ref: 'api.yaml#/components/schemas/Id'
Template:
allOf:
- $ref: 'api.yaml#/components/schemas/_Id'
properties:
name:
type: string
example: humidity
version:
type: number
readOnly: true
example: 1
parameters:
type: array
items:
type: object
properties:
name:
type: string
example: kf
range:
type: object
example:
min: 0
max: 2
TreatmentTemplate:
allOf:
- $ref: 'api.yaml#/components/schemas/Template'
properties:
number_prefix:
type: string
example: B
Email:
properties:
email:
type: string
example: john.doe@bosch.com
UserName:
properties:
name:
type: string
example: johndoe
User:
allOf:
- $ref: 'api.yaml#/components/schemas/_Id'
- $ref: 'api.yaml#/components/schemas/UserName'
- $ref: 'api.yaml#/components/schemas/Email'
properties:
pass:
type: string
writeOnly: true
example: Abc123!#
level:
type: string
example: read
location:
type: string
example: Rng
device_name:
type: string
example: Alpha II