HB, OTA etc
This commit is contained in:
BIN
contract/ingest.zip
Normal file
BIN
contract/ingest.zip
Normal file
Binary file not shown.
29
contract/ingest/command.schema.json
Normal file
29
contract/ingest/command.schema.json
Normal file
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"$id": "contract/ingest/command.schema.json",
|
||||
"type": "object",
|
||||
"required": ["t"],
|
||||
"additionalProperties": false,
|
||||
|
||||
"properties": {
|
||||
"t": {
|
||||
"type": "string",
|
||||
"enum": ["fw"]
|
||||
}
|
||||
},
|
||||
|
||||
"allOf": [
|
||||
{
|
||||
"if": {
|
||||
"properties": { "t": { "const": "fw" } }
|
||||
},
|
||||
"then": {
|
||||
"required": ["u", "s"],
|
||||
"properties": {
|
||||
"u": { "type": "string", "format": "uri" },
|
||||
"s": { "type": "string", "pattern": "^[a-f0-9]{64}$" }
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,38 +1,11 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"$id": "contract/ingest/event.schema.json",
|
||||
"allOf": [
|
||||
{ "$ref": "contract/ingest/common.schema.json" },
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"const": "event"
|
||||
},
|
||||
"payload": {
|
||||
"type": "object",
|
||||
"required": ["name"],
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"description": "Event identifier, e.g. device.overheat"
|
||||
},
|
||||
"severity": {
|
||||
"type": "string",
|
||||
"enum": ["debug", "info", "warn", "error", "fatal"]
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"data": {
|
||||
"type": "object",
|
||||
"additionalProperties": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
"type": "object",
|
||||
"required": ["type"],
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": ["hb"]
|
||||
}
|
||||
]
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
Reference in New Issue
Block a user