aboutsummaryrefslogtreecommitdiff
path: root/schemas_json
diff options
context:
space:
mode:
Diffstat (limited to 'schemas_json')
-rw-r--r--schemas_json/messages.yaml49
1 files changed, 49 insertions, 0 deletions
diff --git a/schemas_json/messages.yaml b/schemas_json/messages.yaml
index 899f786..44b8c3a 100644
--- a/schemas_json/messages.yaml
+++ b/schemas_json/messages.yaml
@@ -1,4 +1,53 @@
---
"$schema": "http://json-schema.org/schema#"
id: "opcut://messages.yaml#"
+oneOf:
+ - "$ref": "opcut://messages.yaml#/definitions/calculate/request"
+ - "$ref": "opcut://messages.yaml#/definitions/calculate/response"
+ - "$ref": "opcut://messages.yaml#/definitions/generate_output/request"
+ - "$ref": "opcut://messages.yaml#/definitions/generate_output/response"
+definitions:
+ calculate:
+ request:
+ type: object
+ required:
+ - params
+ - method
+ properties:
+ params:
+ "$ref": "opcut://params.yaml#"
+ method:
+ enum:
+ - GREEDY
+ - FORWARD_GREEDY
+ response:
+ type: object
+ required:
+ - result
+ properties:
+ result:
+ oneOf:
+ - type: "null"
+ - "$ref": "opcut://result.yaml#"
+ generate_output:
+ request:
+ type: object
+ required:
+ - result
+ - output_type
+ properties:
+ result:
+ "$ref": "opcut://result.yaml#"
+ output_type:
+ enum:
+ - PDF
+ response:
+ type: object
+ required:
+ - data
+ properties:
+ result:
+ type:
+ - string
+ - "null"
...