aboutsummaryrefslogtreecommitdiff
path: root/schemas
diff options
context:
space:
mode:
Diffstat (limited to 'schemas')
-rw-r--r--schemas/opcut.yaml54
-rw-r--r--schemas/openapi.yaml13
2 files changed, 59 insertions, 8 deletions
diff --git a/schemas/opcut.yaml b/schemas/opcut.yaml
index 47e0a7f..8dadb93 100644
--- a/schemas/opcut.yaml
+++ b/schemas/opcut.yaml
@@ -4,6 +4,8 @@ id: "opcut://opcut.yaml#"
definitions:
params:
type: object
+ description: |
+ calculation input parameters independent of calculation method
required:
- cut_width
- panels
@@ -11,20 +13,30 @@ definitions:
properties:
cut_width:
type: number
+ description: |
+ width of the guillotine cut
min_initial_usage:
type: boolean
+ description: |
+ minimize usage of initial panels
panels:
type: object
+ description: |
+ input panels (keys represent unique panel identifiers)
patternProperties:
".+":
"$ref": "opcut://opcut.yaml#/definitions/panel"
items:
type: object
+ description: |
+ required items (keys represent unique item identifiers)
patternProperties:
".+":
"$ref": "opcut://opcut.yaml#/definitions/item"
result:
type: object
+ description: |
+ calculation result
required:
- params
- used
@@ -34,24 +46,36 @@ definitions:
"$ref": "opcut://opcut.yaml#"
used:
type: array
+ description: |
+ resulting panels associated with required items
items:
"$ref": "opcut://opcut.yaml#/definitions/used"
unused:
type: array
+ description: |
+ resulting unused panels
items:
"$ref": "opcut://opcut.yaml#/definitions/unused"
panel:
type: object
+ description: |
+ single input panel
required:
- width
- height
properties:
width:
type: number
+ description: |
+ panel's initial width
height:
type: number
+ description: |
+ panel's initial height
item:
type: object
+ description: |
+ single required item
required:
- width
- height
@@ -59,12 +83,20 @@ definitions:
properties:
width:
type: number
+ description: |
+ items's width
height:
type: number
+ description: |
+ items's height
can_rotate:
type: boolean
+ description: |
+ can item be rotated (is grain direction irrelevant)
used:
type: object
+ description: |
+ single resulting panels associated with required item
required:
- panel
- item
@@ -74,16 +106,28 @@ definitions:
properties:
panel:
type: string
+ description: |
+ input panel identifier
item:
type: string
+ description: |
+ matching required item identifier
x:
type: number
+ description: |
+ used panel location based on input panel's width offset
y:
type: number
+ description: |
+ used panel location based on input panel's height offset
rotate:
type: boolean
+ description: |
+ is resulting panel rotated
unused:
type: object
+ description: |
+ single unused resulting panel
required:
- panel
- width
@@ -93,12 +137,22 @@ definitions:
properties:
panel:
type: string
+ description: |
+ input panel identifier
width:
type: number
+ description: |
+ unused resulting panel's width
height:
type: number
+ description: |
+ unused resulting panel's height
x:
type: number
+ description: |
+ used panel location based on input panel's width offset
y:
type: number
+ description: |
+ used panel location based on input panel's height offset
...
diff --git a/schemas/openapi.yaml b/schemas/openapi.yaml
index 442f685..e459030 100644
--- a/schemas/openapi.yaml
+++ b/schemas/openapi.yaml
@@ -2,16 +2,11 @@
openapi: 3.1.0
info:
title: opcut
- version: 0.0.1
+ version: 0.0.2
paths:
'/calculate':
post:
parameters:
- - name: native
- in: query
- required: false
- schema:
- type: boolean
- name: method
in: query
required: true
@@ -19,6 +14,8 @@ paths:
enum:
- greedy
- forward_greedy
+ - greedy_native
+ - forward_greedy_native
requestBody:
content:
application/json:
@@ -34,10 +31,10 @@ paths:
content:
text/plain:
description: error message
- '/generate_output':
+ '/generate':
post:
parameters:
- - name: output_type
+ - name: output_format
in: query
required: true
schema: