86 lines
2.0 KiB
JSON
Executable File
86 lines
2.0 KiB
JSON
Executable File
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"$id": "https://cognitive-agent.local/schemas/common.schema.json",
|
|
"$defs": {
|
|
"metadata": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["id", "name", "version"],
|
|
"properties": {
|
|
"id": {
|
|
"type": "string",
|
|
"pattern": "^[a-z0-9][a-z0-9._-]{2,127}$"
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"maxLength": 128
|
|
},
|
|
"version": {
|
|
"type": "string",
|
|
"pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+(?:[-+][0-9A-Za-z.-]+)?$"
|
|
},
|
|
"request_id": {
|
|
"type": "string",
|
|
"minLength": 3,
|
|
"maxLength": 128
|
|
},
|
|
"generated_at": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"description": {
|
|
"type": "string",
|
|
"maxLength": 1000
|
|
},
|
|
"labels": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string",
|
|
"maxLength": 128
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"target": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["device"],
|
|
"properties": {
|
|
"device": {
|
|
"type": "string",
|
|
"pattern": "^[a-z][a-z0-9_]*$"
|
|
},
|
|
"zone": {
|
|
"type": "string",
|
|
"pattern": "^[a-z][a-z0-9_]*$"
|
|
},
|
|
"instance": {
|
|
"type": "string",
|
|
"pattern": "^[a-z][a-z0-9_]*$"
|
|
}
|
|
}
|
|
},
|
|
"transition": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"duration_ms": {
|
|
"type": "integer",
|
|
"minimum": 0,
|
|
"maximum": 3600000
|
|
},
|
|
"profile": {
|
|
"type": "string",
|
|
"enum": ["immediate", "linear", "ease_in", "ease_out", "ease_in_out", "device_default"]
|
|
}
|
|
}
|
|
},
|
|
"failure_policy": {
|
|
"type": "string",
|
|
"enum": ["abort", "skip", "continue", "compensate"]
|
|
}
|
|
}
|
|
}
|
|
|