From 490b99a8488ecf6d7d39183212852f813cf614ec Mon Sep 17 00:00:00 2001 From: Aarni Halinen Date: Thu, 28 Jul 2022 22:13:01 +0300 Subject: [PATCH] Fix schema type --- webapp/questionSchema.json | 34 ++++++++++++++++++++++++++++++---- 1 file changed, 30 insertions(+), 4 deletions(-) diff --git a/webapp/questionSchema.json b/webapp/questionSchema.json index 06a4f64..37bef74 100644 --- a/webapp/questionSchema.json +++ b/webapp/questionSchema.json @@ -110,10 +110,36 @@ "options": { "properties": { "enum": { - "items": { - "type": "string" - }, - "type": "array" + "anyOf": [ + { + "maxItems": 0, + "minItems": 0, + "type": "array" + }, + { + "items": [ + { + "type": "number" + } + ], + "maxItems": 1, + "minItems": 1, + "type": "array" + }, + { + "items": [ + { + "type": "number" + }, + { + "type": "number" + } + ], + "maxItems": 2, + "minItems": 2, + "type": "array" + } + ] } }, "type": "object"