diff --git a/open-api/open-api-model/src/main/resources/3d-api.yaml b/open-api/open-api-model/src/main/resources/3d-api.yaml index 4fa45b01..638fa447 100644 --- a/open-api/open-api-model/src/main/resources/3d-api.yaml +++ b/open-api/open-api-model/src/main/resources/3d-api.yaml @@ -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 @@ -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: @@ -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: @@ -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