diff --git a/run_start_metadata_schema.json b/run_start_metadata_schema.json new file mode 100644 index 0000000..41cc027 --- /dev/null +++ b/run_start_metadata_schema.json @@ -0,0 +1,79 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://github.com/ISISComputingGroup/DataStreaming/blob/main/run_start_metadata_schema.json", + "title": "run_start_metadata_schema", + "description": "Schema for run start metadata used at ISIS for kafka_dae_diagnostics", + "type": "object", + "properties": { + "num_periods": { + "description": "The total number of periods for this run, 1 indexed.", + "type": "integer" + }, + "max_time_channels": { + "description": "The maximum number of time channels for this run.", + "type": "integer" + }, + "time_regimes": { + "description": "The time regimes for this run.", + "type": "array", + "minItems": 1, + "items": { + "type": "array", + "description": "time regime rows", + "items": { + "$comment": "Either linear time regime rows, or an arbitrary list of bin-edges.", + "oneOf": [ + { + "type": "object", + "description": "time regime row", + "properties": { + "from": { + "type": "number" + }, + "to": { + "type": "number" + }, + "steps": { + "type": "number" + }, + "mode": { + "enum": [ + "dT = C", + "dT/T = C", + "dT/T**2 = C", + "Shifted" + ] + } + } + }, + { + "type": "integer" + } + ] + } + } + }, + "vetos": { + "description": "The vetos for this run", + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "enabled": { + "type": "boolean" + } + } + } + } + }, + "required": [ + "num_periods", + "num_time_channels", + "time_regimes", + "vetos" + ] +} \ No newline at end of file