{
  "definitions": {},
  "$schema": "http://json-schema.org/draft-07/schema",
  "$id": "https://iotlorawan.azurewebsites.net/sensorInfo.json",
  "type": "array",
  "title": "List of available sensors",
  "default": null,
  "items": {
    "$id": "#/items",
    "type": "object",
    "title": "Sensor info",
    "description": "Full description of each sensor",
    "required": [
      "eui",
      "status"
    ],
    "properties": {
      "eui": {
        "$id": "#/items/properties/eui",
        "type": "string",
        "title": "Eui",
        "pattern": "^[0-9a-fA-F]+"
      },
      "acronym": {
        "$id": "#/items/properties/acronym",
        "type": "string",
        "title": "Acronym",
        "pattern": "^[A-Z]+-[0-9]+"
      },
      "name": {
        "$id": "#/items/properties/name",
        "type": "string",
        "title": "Name",
        "pattern": "^(.*)$"
      },
      "period": {
        "$id": "#/items/properties/period",
        "type": "integer",
        "title": "Period",
        "minimum": 0.0
      },
      "tolerance": {
        "$id": "#/items/properties/tolerance",
        "type": "integer",
        "title": "Tolerance"
      },
      "location": {
        "$id": "#/items/properties/location",
        "type": "string",
        "title": "Location",
        "description": "String location of the sensor.",
        "default": "unknown",
        "pattern": "^(.*)$"
      },
      "description": {
        "$id": "#/items/properties/description",
        "type": "string",
        "title": "Sensor description",
        "default": "",
        "pattern": "^(.*)$"
      },
      "sensorDataId": {
        "$id": "#/items/properties/sensorDataId",
        "type": "integer",
        "title": "Identifier of the sensor"
      },
      "sensorDataTime": {
        "$id": "#/items/properties/sensorDataTime",
        "type": "string",
        "title": "Sensor Data time",
        "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})(.(?<millisecond>[0-9]+))?"
      },
      "created": {
        "$id": "#/items/properties/created",
        "type": ["string","null"],
        "title": "Created date time",
        "description": "Date when the sensor was connected.",
        "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})(.(?<millisecond>[0-9]+))?"
      },
      "deleted": {
        "$id": "#/items/properties/deleted",
        "type": ["string","null"],
        "title": "Deleted date time",
        "description": "Date when the sensor was disconnected.",
        "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})(.(?<millisecond>[0-9]+))?"
      },
      "status": {
        "$id": "#/items/properties/status",
        "type": "integer",
        "title": "Status of the sensor",
        "description": "Signalizes state of the sensor: 1 - active, 0 - inactive.",
        "minimum": 0.0,
        "maximum": 1.0
      }
    }
  }
}
