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

225 lines
4.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-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-08-12 11:20:26 +02:00
example: as-delivered/raw
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-06-25 10:44:55 +02:00
added:
type: string
example: 1970-01-01T00:00:00.000Z
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
custom_fields:
type: object
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-07-22 10:53:45 +02:00
properties:
sample_id:
$ref: 'api.yaml#/components/schemas/Id'
relation:
type: string
example: part to this sample
measurements:
2020-04-21 10:53:07 +02:00
type: array
items:
allOf:
- $ref: 'api.yaml#/components/schemas/Measurement'
user:
type: string
example: admin
status:
type: string
description: can be deleted/new/validated
example: new
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-07-15 13:11:33 +02:00
properties:
type: object
properties:
material_template:
$ref: 'api.yaml#/components/schemas/Id'
example:
material_template: 5ea0450ed851c30a90e70894
2020-07-15 13:11:33 +02:00
mineral: 0
glass_fiber: 40
carbon_fiber: 0
2020-04-29 12:10:27 +02:00
numbers:
type: array
items:
2020-07-15 13:11:33 +02:00
type: string
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:
2020-05-27 17:03:03 +02:00
sample_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-07-23 15:25:45 +02:00
first_id:
readOnly: true
type: string
example: 5ea0450ed851c30a90e70894
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
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
2020-08-06 13:58:12 +02:00
devices:
type: array
items:
type: string
example: Alpha II
2020-08-19 13:48:47 +02:00
ModelItem:
properties:
name:
type: string
example: Model 1.1
url:
type: string
example: https://definma-model-test.apps.de1.bosch-iot-cloud.com/predict/model1-1
label:
type: string
example: 'ml/g'