aboutsummaryrefslogtreecommitdiff
path: root/schemas_json
diff options
context:
space:
mode:
Diffstat (limited to 'schemas_json')
-rw-r--r--schemas_json/messages.yaml4
-rw-r--r--schemas_json/params.yaml46
-rw-r--r--schemas_json/result.yaml59
3 files changed, 109 insertions, 0 deletions
diff --git a/schemas_json/messages.yaml b/schemas_json/messages.yaml
new file mode 100644
index 0000000..899f786
--- /dev/null
+++ b/schemas_json/messages.yaml
@@ -0,0 +1,4 @@
+---
+"$schema": "http://json-schema.org/schema#"
+id: "opcut://messages.yaml#"
+...
diff --git a/schemas_json/params.yaml b/schemas_json/params.yaml
new file mode 100644
index 0000000..24d687f
--- /dev/null
+++ b/schemas_json/params.yaml
@@ -0,0 +1,46 @@
+---
+"$schema": "http://json-schema.org/schema#"
+id: "opcut://params.yaml#"
+type: object
+required:
+ - cut_width
+ - panels
+ - items
+properties:
+ cut_width:
+ type: number
+ panels:
+ type: object
+ patternProperties:
+ "(.)+":
+ "$ref": "opcut://params.yaml#/definitions/panel"
+ items:
+ type: object
+ patternProperties:
+ "(.)+":
+ "$ref": "opcut://params.yaml#/definitions/item"
+definitions:
+ panel:
+ type: object
+ required:
+ - width
+ - height
+ properties:
+ width:
+ type: number
+ height:
+ type: number
+ item:
+ type: object
+ required:
+ - width
+ - height
+ - can_rotate
+ properties:
+ width:
+ type: number
+ height:
+ type: number
+ can_rotate:
+ type: boolean
+...
diff --git a/schemas_json/result.yaml b/schemas_json/result.yaml
new file mode 100644
index 0000000..ceb3f42
--- /dev/null
+++ b/schemas_json/result.yaml
@@ -0,0 +1,59 @@
+---
+"$schema": "http://json-schema.org/schema#"
+id: "opcut://result.yaml#"
+type: object
+required:
+ - params
+ - used
+ - unused
+properties:
+ params:
+ "$ref": "opcut://params.yaml#"
+ used:
+ type: array
+ items:
+ "$ref": "opcut://result.yaml#/definitions/used"
+ unused:
+ type: array
+ items:
+ "$ref": "opcut://result.yaml#/definitions/unused"
+definitions:
+ used:
+ type: object
+ required:
+ - panel
+ - item
+ - x
+ - y
+ - rotate
+ properties:
+ panel:
+ type: string
+ item:
+ type: string
+ x:
+ type: number
+ y:
+ type: number
+ rotate:
+ type: boolean
+ unused:
+ type: object
+ required:
+ - panel
+ - width
+ - height
+ - x
+ - y
+ properties:
+ panel:
+ type: string
+ width:
+ type: number
+ height:
+ type: number
+ x:
+ type: number
+ y:
+ type: number
+...