{
  "definitions": {},
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://iotlorawan.azurewebsites.net/sensorInfo.json",
  "type": "object",
  "title": "Detailed sensor data",
  "required": [
    "eui",
    "name",
    "data"
  ],
  "properties": {
    "eui": {
      "$id": "#/properties/eui",
      "type": "string",
      "title": "Eui",
      "pattern": "^[0-9a-fA-F]+"
    },
    "name": {
      "$id": "#/properties/name",
      "type": "string",
      "title": "Name",
      "pattern": "^(.*)$"
    },
    "data": {
      "$id": "#/properties/data",
      "type": "array",
      "title": "The Data Schema",
      "items": {
        "$id": "#/properties/data/items",
        "type": "object",
        "title": "The Items Schema",
        "properties": {
          "time": {
            "$id": "#/properties/data/items/properties/time",
            "type": "string",
            "title": "Time",
            "description": "Date time when data was measured.",
            "pattern": "^(?<year>[0-9]{4})-(?<month>[0-9]{2})-(?<day>[0-9]{2})T(?<hour>[0-9]{2}):(?<minute>[0-9]{2}):(?<second>[0-9]{2})[+](?<zone>[0-9]{2}[:][0-9]{2})"
          },
          "temperature": {
            "$id": "#/properties/data/items/properties/temperature",
            "type": ["number", "null"],
            "title": "Temperature"
          },
          "humidity": {
            "$id": "#/properties/data/items/properties/humidity",
            "type": ["number", "null"],
            "title": "Humidity"
          },
          "co2": {
            "$id": "#/properties/data/items/properties/co2",
            "type": ["integer", "null"],
            "title": "Co2"
          },
          "rssi": {
            "$id": "#/properties/data/items/properties/rssi",
            "type": ["integer", "null"],
            "title": "Rssi"
          },
          "snr": {
            "$id": "#/properties/data/items/properties/snr",
            "type": ["number", "null"],
            "title": "Snr"
          },
          "batteryLevel": {
            "$id": "#/properties/data/items/properties/batteryLevel",
            "type": ["number", "null"],
            "title": "Battery level",
            "minimum": 0
          }
        }
      }
    }
  }
}