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-07-15 13:11:33 +02:00

199 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
readOnly: true
example: Rng172
type:
type: string
example: granulate
batch:
type: string
example: 1560237365
condition:
type: object
properties:
condition_template:
$ref: 'api.yaml#/components/schemas/Id'
example:
condition_template: 5ea0450ed851c30a90e70894
material: hot air
weeks: 5
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'
added:
type: string
example: 1970-01-01T00:00:00.000Z
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:
sample_id:
$ref: 'api.yaml#/components/schemas/Id'
relation:
type: string
example: part to this sample
custom_fields:
type: object
SampleDetail:
allOf:
- $ref: 'api.yaml#/components/schemas/_Id'
- $ref: 'api.yaml#/components/schemas/Color'
- $ref: 'api.yaml#/components/schemas/SampleProperties'
properties:
material:
allOf:
- $ref: 'api.yaml#/components/schemas/Material'
notes:
type: object
properties:
comment:
type: string
sample_references:
type: array
items:
$ref: 'api.yaml#/components/schemas/Id'
measurements:
type: array
items:
allOf:
- $ref: 'api.yaml#/components/schemas/Measurement'
user:
type: string
example: admin
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
properties:
type: object
properties:
material_template:
$ref: 'api.yaml#/components/schemas/Id'
example:
condition_template: 5ea0450ed851c30a90e70894
mineral: 0
glass_fiber: 40
carbon_fiber: 0
numbers:
type: array
items:
type: string
example: 5514263423
Measurement:
allOf:
- $ref: 'api.yaml#/components/schemas/_Id'
properties:
sample_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
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