mirror of
https://github.com/mcloh/decision-models-benchmark.git
synced 2026-11-06 06:14:11 +00:00
setup environment
This commit is contained in:
79
contracts/jev/schemas/request.schema.json
Normal file
79
contracts/jev/schemas/request.schema.json
Normal file
@@ -0,0 +1,79 @@
|
||||
{
|
||||
"$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}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user