vpp-ai-platform/contracts/schema/decision_case.json

135 lines
3.3 KiB
JSON
Raw Permalink Normal View History

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1
},
"kind": {
"type": "string",
"enum": [
"DAY_AHEAD_BID",
"DR_EVENT",
"DEVIATION_RESOLUTION",
"REVIEW",
"ADHOC_ANALYSIS"
]
},
"objective": {
"type": "string",
"minLength": 1
},
"owner": {
"type": "string",
"minLength": 1
},
"deadline": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
},
"status": {
"type": "string",
"enum": [
"OPEN",
"IN_PROGRESS",
"AWAITING_APPROVAL",
"CLOSED_DONE",
"CLOSED_ABORTED"
]
},
"refs": {
"type": "object",
"properties": {
"evidence": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
}
},
"proposals": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
}
},
"approvals": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
}
},
"permits": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
}
},
"scenarios": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
}
},
"outcome": {
"anyOf": [
{
"type": "string",
"minLength": 1
},
{
"type": "null"
}
]
}
},
"required": [
"evidence",
"proposals",
"approvals",
"permits",
"scenarios",
"outcome"
],
"additionalProperties": false
},
"opened_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
},
"closed_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"kind",
"objective",
"owner",
"deadline",
"status",
"refs",
"opened_at",
"closed_at"
],
"additionalProperties": false,
"$id": "https://vpp-ai-platform/contracts/decision_case.json",
"title": "DecisionCase"
}