{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "jev-compat-v1/request.schema.json", "title": "JEV systemone request (jev-compat-v1)", "type": "object", "required": ["model", "state", "questions"], "additionalProperties": false, "properties": { "model": {"type": "string", "minLength": 1}, "state": { "oneOf": [ {"type": "string", "minLength": 1}, {"type": "object", "minProperties": 1}, {"type": "array", "minItems": 1} ] }, "questions": { "type": "object", "minProperties": 1, "additionalProperties": {"$ref": "#/$defs/question"} } }, "$defs": { "question": { "type": "object", "required": ["type", "instructions", "criteria"], "additionalProperties": false, "properties": { "type": {"enum": ["choice", "noul", "score"]}, "instructions": {"type": "string", "minLength": 1}, "criteria": {} }, "allOf": [ { "if": {"properties": {"type": {"const": "choice"}}}, "then": { "properties": { "criteria": { "type": "object", "minProperties": 2, "maxProperties": 16, "additionalProperties": {"type": "string", "minLength": 1} } } } }, { "if": {"properties": {"type": {"const": "noul"}}}, "then": { "properties": { "criteria": { "type": "object", "required": ["true", "false"], "additionalProperties": false, "properties": { "true": {"type": "string", "minLength": 1}, "false": {"type": "string", "minLength": 1} } } } } }, { "if": {"properties": {"type": {"const": "score"}}}, "then": { "properties": { "criteria": { "type": "array", "minItems": 2, "maxItems": 16, "items": {"type": "string", "minLength": 1} } } } } ] } } }