From 8e3611c34f832fe6d9af67129e2930516d926e7e Mon Sep 17 00:00:00 2001 From: bozokopic Date: Thu, 12 Apr 2018 15:40:26 +0200 Subject: backend web server --- schemas_json/messages.yaml | 49 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) (limited to 'schemas_json') 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" ... -- cgit v1.2.3-70-g09d2