Files
decision-models-benchmark/contracts/jev/schemas/request.schema.json
Marcos Lohmann aeee6c7de1 setup environment
2026-10-07 11:14:29 -03:00

80 lines
2.2 KiB
JSON

{
"$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": 20,
"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": 20,
"items": {"type": "string", "minLength": 1}
}
}
}
}
]
}
}
}