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/oas/schemas.yaml
2020-04-24 12:25:32 +02:00

169 lines
3.6 KiB
YAML

Id:
type: string
example: 5ea0450ed851c30a90e70894
_Id:
properties:
_id:
allOf:
- $ref: 'oas.yaml#/components/schemas/Id'
readOnly: true
Color:
properties:
color:
type: string
SampleProperties:
properties:
sample_number:
type: string
type:
type: string
batch:
type: string
validated:
type: boolean
Samples:
allOf:
- $ref: 'oas.yaml#/components/schemas/_Id'
- $ref: 'oas.yaml#/components/schemas/Color'
- $ref: 'oas.yaml#/components/schemas/SampleProperties'
properties:
material_id:
$ref: 'oas.yaml#/components/schemas/Id'
note_id:
$ref: 'oas.yaml#/components/schemas/Id'
user_id:
$ref: 'oas.yaml#/components/schemas/Id'
Sample:
allOf:
- $ref: 'oas.yaml#/components/schemas/_Id'
- $ref: 'oas.yaml#/components/schemas/Color'
- $ref: 'oas.yaml#/components/schemas/SampleProperties'
properties:
material:
$ref: 'oas.yaml#/components/schemas/Material'
notes:
type: object
properties:
comments:
type: string
sample_references:
type: array
items:
$ref: 'oas.yaml#/components/schemas/Id'
SampleDetail:
allOf:
- $ref: 'oas.yaml#/components/schemas/_Id'
- $ref: 'oas.yaml#/components/schemas/Color'
- $ref: 'oas.yaml#/components/schemas/SampleProperties'
properties:
material:
$ref: 'oas.yaml#/components/schemas/Material'
notes:
type: object
properties:
comments:
type: string
sample_references:
type: array
items:
$ref: 'oas.yaml#/components/schemas/Id'
conditions:
type: array
items:
$ref: 'oas.yaml#/components/schemas/Condition'
Material:
allOf:
- $ref: 'oas.yaml#/components/schemas/_Id'
properties:
material_numbers:
type: array
items:
type: object
allOf:
- $ref: 'oas.yaml#/components/schemas/Color'
properties:
number:
type: number
material_group:
type: string
supplier:
type: string
material_name:
type: string
mineral:
type: number
glass_fiber:
type: number
carbon_fiber:
type: number
Condition:
allOf:
- $ref: 'oas.yaml#/components/schemas/_Id'
properties:
sample_id:
$ref: 'oas.yaml#/components/schemas/Id'
parameters:
type: object
treatment_template:
$ref: 'oas.yaml#/components/schemas/Id'
Measurement:
allOf:
- $ref: 'oas.yaml#/components/schemas/_Id'
properties:
condition_id:
$ref: 'oas.yaml#/components/schemas/Id'
values:
type: object
measurement_template:
$ref: 'oas.yaml#/components/schemas/Id'
Template:
allOf:
- $ref: 'oas.yaml#/components/schemas/_Id'
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
UserName:
properties:
name:
type: string
example: johndoe
User:
allOf:
- $ref: 'oas.yaml#/components/schemas/_Id'
- $ref: 'oas.yaml#/components/schemas/UserName'
- $ref: 'oas.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