44 lines
1012 B
JSON
44 lines
1012 B
JSON
{
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
"$id": "contract/ingest/telemetry.schema.json",
|
|
"type": "object",
|
|
"required": ["m", "s", "u", "v"],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"m": {
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"description": "Metric type (e.g. t=temperature, h=humidity)"
|
|
},
|
|
"s": {
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"description": "Source identifier (sensor/channel)"
|
|
},
|
|
"u": {
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"description": "Unit (e.g. c, pct, v)"
|
|
},
|
|
"v": {
|
|
"type": "array",
|
|
"minItems": 1,
|
|
"items": {
|
|
"type": "array",
|
|
"minItems": 2,
|
|
"maxItems": 2,
|
|
"items": [
|
|
{
|
|
"type": "integer",
|
|
"minimum": 0,
|
|
"description": "Delta time (seconds) from base ts"
|
|
},
|
|
{
|
|
"type": "number",
|
|
"description": "Measured value"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
} |