{
  "definitions": {},
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://schemas.ruter.no/adt/ota/api/v4.x/pe/dpi/logs/dpi-logs.json",
  "type": "object",
  "title": "DpiLogs",
  "description": "Logs from the DPI client",
  "required": [
    "eventTimestamp",
    "traceId",
    "clientId", 
    "payload"
  ],
  "additionalProperties": true,
  "properties": {
    "eventTimestamp": {
      "$id": "#/properties/eventTimestamp",
      "type": "string",
      "description": "As specified in the [ADT documentation.](https://adt.transhub.io)",
      "format": "date-time"
    },
    "traceId": {
      "$id": "#/properties/traceId",
      "type": "string",
      "description": "A unique identifier - UUID"
    },
    "clientId": {
      "$id": "#/properties/clientId",
      "type": "string",
      "description": "clientId used in client that produced this message",
      "examples": ["53f93598-8e82-4a38-9def-10075d07bb33"],
      "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
    },
    "payload": {
      "$id": "#/properties/payload",
      "type": "object",
      "description": "Logs from the DPI client",
      "required": [
        "level",
        "message"
      ],
      "additionalProperties": true,
      "properties": {
        "level": {
          "$id": "#/properties/payload/properties/level",
          "type": "string",
          "description": "Log level"
        },
        "message": {
          "$id": "#/properties/payload/properties/message",
          "type": "string",
          "description": "Log message"
        }
      }
    }
  }
}
