diff options
| author | bozokopic <bozo.kopic@gmail.com> | 2018-04-12 14:14:39 +0200 |
|---|---|---|
| committer | bozokopic <bozo.kopic@gmail.com> | 2018-04-12 14:14:39 +0200 |
| commit | 2b6b2b429376d05931b67cd2009dd5aa93cc841f (patch) | |
| tree | 119943b64bf1f7ad05ff7e8c960b68c79d4b649a /schemas_json | |
| parent | e6974a745be9aef7982fb3788485550918ea2b75 (diff) | |
main.py
Diffstat (limited to 'schemas_json')
| -rw-r--r-- | schemas_json/messages.yaml | 4 | ||||
| -rw-r--r-- | schemas_json/params.yaml | 46 | ||||
| -rw-r--r-- | schemas_json/result.yaml | 59 |
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 +... |
