Skip to content

Commit

Permalink
Adjust openapi (#968)
Browse files Browse the repository at this point in the history
  • Loading branch information
skjolber authored Jan 11, 2025
1 parent de37c71 commit c1e06c7
Showing 1 changed file with 83 additions and 125 deletions.
208 changes: 83 additions & 125 deletions open-api/open-api-model/src/main/resources/3d-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,99 +27,6 @@ paths:

components:
schemas:
StackValue:
type: object
discriminator:
propertyName: stackableValueType
mapping:
box: "#/components/schemas/BoxStackValue"
container: "#/components/schemas/ContainerStackValue"
properties:
dx:
type: integer
dy:
type: integer
dz:
type: integer
Stackable:
type: object
discriminator:
propertyName: stackableType
mapping:
box: "#/components/schemas/Box"
container: "#/components/schemas/Container"
properties:
id:
type: string
description:
type: string
ContainerStackValue:
allOf:
- $ref: "#/components/schemas/StackValue"
- type: object
properties:
minLoadWeight:
type: integer
maxLoadWeight:
type: integer
loadDx:
type: integer
loadDy:
type: integer
loadDz:
type: integer
Container:
allOf:
- $ref: "#/components/schemas/Stackable"
- type: object
properties:
emptyWeight:
type: integer
stackableSize:
$ref: '#/components/schemas/ContainerStackableSize'
cost:
type: integer

ContainerItem:
allOf:
- $ref: "#/components/schemas/StackableItem"
- type: object
properties:
container:
$ref: '#/components/schemas/Container'

BoxStackValue:
allOf: # Combines the BasicErrorModel and the inline model
- $ref: "#/components/schemas/StackValue"

Box:
allOf:
- $ref: "#/components/schemas/Stackable"
- type: object
properties:
weight:
type: integer
size:
$ref: '#/components/schemas/BoxStackableSize'

StackableItem:
type: object
discriminator:
propertyName: stackableType
mapping:
box: "#/components/schemas/BoxItem"
container: "#/components/schemas/ContainerItem"
properties:
count:
type: integer

BoxItem:
allOf:
- $ref: "#/components/schemas/StackableItem"
- type: object
properties:
box:
$ref: '#/components/schemas/Box'

Surface:
type: string
Expand All @@ -144,14 +51,52 @@ components:
- bottomAtNinetyDegrees
- all

StackableSize:
PackedContainer:
type: object
properties:
id:
type: string
dx:
type: integer
dy:
type: integer
dz:
type: integer
weight:
type: integer

PackedBox:
type: object
properties:
id:
type: string
x:
type: integer
y:
type: integer
z:
type: integer
dx:
type: integer
dy:
type: integer
dz:
type: integer
weight:
type: integer

Stackable:
type: object
discriminator:
propertyName: stackableSizeType
mapping:
box: "#/components/schemas/BoxStackableSize"
container: "#/components/schemas/ContainerStackableSize"
box: "#/components/schemas/Box"
container: "#/components/schemas/Container"
properties:
id:
type: string
description:
type: string
dx:
type: integer
dy:
Expand All @@ -163,13 +108,17 @@ components:
items:
$ref: '#/components/schemas/Surface'

BoxStackableSize:
Box:
allOf:
- $ref: "#/components/schemas/StackableSize"
- $ref: "#/components/schemas/Stackable"
- type: object
properties:
weight:
type: integer

ContainerStackableSize:
Container:
allOf:
- $ref: "#/components/schemas/StackableSize"
- $ref: "#/components/schemas/Stackable"
- type: object
properties:
loadDx:
Expand All @@ -182,44 +131,53 @@ components:
type: integer
maxLoadWeight:
type: integer

StackPlacement:
emptyWeight:
type: integer

StackableItem:
type: object
discriminator:
propertyName: stackableType
mapping:
box: "#/components/schemas/BoxItem"
container: "#/components/schemas/ContainerItem"
properties:
stackable:
$ref: '#/components/schemas/Box'
stackValue:
$ref: '#/components/schemas/BoxStackValue'
x:
type: integer
y:
count:
type: integer
z:
type: integer

ContainerItem:
allOf:
- $ref: "#/components/schemas/StackableItem"
- type: object
properties:
container:
$ref: '#/components/schemas/Container'

BoxItem:
allOf:
- $ref: "#/components/schemas/StackableItem"
- type: object
properties:
box:
$ref: '#/components/schemas/Box'

Packager:
type: object
properties:
id:
type: string
maxDuration:
maxDurationInPercent:
type: integer
Stack:

PackResult:
type: object
properties:
placements:
container:
$ref: '#/components/schemas/PackedContainer'
boxes:
type: array
items:
$ref: '#/components/schemas/StackPlacement'

PackResult:
type: object
properties:
id:
type: string
stack:
$ref: '#/components/schemas/Stack'
stackValue:
$ref: '#/components/schemas/ContainerStackValue'
$ref: '#/components/schemas/PackedBox'

PackResponse:
type: object
Expand Down

0 comments on commit c1e06c7

Please sign in to comment.