{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://www.therealer.com/docs/api/schemas/http-feed-data-item.schema.json",
  "title": "Realer HTTP feed-data item",
  "type": "object",
  "required": ["value", "value_received_at", "message_id"],
  "oneOf": [
    { "required": ["command_id"] },
    { "required": ["sensor_id"] }
  ],
  "properties": {
    "command_id": { "type": "integer" },
    "sensor_id": { "type": "integer" },
    "value": { "type": "string" },
    "value_received_at": { "type": "string", "format": "date-time" },
    "message_id": { "type": "string" },
    "desired_id": { "type": "string" },
    "report_status": {
      "type": "string",
      "enum": ["reported", "applied", "rejected", "stale"]
    },
    "sequence_number": { "type": "integer" }
  },
  "additionalProperties": true
}
