{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://schemas.ruter.no/adt/ota/api/v4.x/sensors/temperature-indoor/temperature-indoor.json",
  "type": "object",
  "title": "TemperatureIndoor",
  "description": "Schema for indoor temperature sensor data. The value represents the measured air temperature in degrees Celsius (°C) at a specific location within the vehicle. Location is defined by the car, zone (front, middle, rear, driver cabin), and level (e.g. below platform, platform, or upper level).",
  "required": [
    "eventTimestamp",
    "traceId",
    "messageNumber",
    "sensorId",
    "zone",
    "value"
  ],
  "properties": {
    "eventTimestamp": {
      "$id": "#/properties/eventTimestamp",
      "type": "string",
      "description": "ISO 8601 timestamp in UTC (must end with 'Z'), indicating when the measurement was taken.",
      "example": "2025-05-13T12:00:00.000Z"
    },
    "traceId": {
      "$id": "#/properties/traceId",
      "type": "string",
      "description": "Unique identifier for tracing the message.",
      "example": "baf3d8ac-1234-4e0c-9e9e-abc123def456"
    },
    "messageNumber": {
      "$id": "#/properties/messageNumber",
      "type": "integer",
      "description": "Sequence number, increased by one for each new message.",
      "example": 27
    },
    "sensorId": {
      "$id": "#/properties/sensorId",
      "type": "string",
      "description": "Unique identifier for the sensor. Typically the serial number (S/N) from the sensor.",
      "example": "SN-456789"
    },
    "zone": {
      "$id": "#/properties/zone",
      "type": "integer",
      "minimum": 0,
      "description": "Position along the vehicle's lengthwise direction from its defined front, divided into zones (0 .. n)",
      "example": 2
    },
    "level": {
      "$id": "#/properties/level",
      "type": "integer",
      "minimum": 0,
      "maximum": 2,
      "description": "Vertical level of the sensor. If not provided, the default is 1 (platform level).",
      "example": 2
    },
    "value": {
      "$id": "#/properties/value",
      "type": "number",
      "minimum": -40.0,
      "maximum": 50.0,
      "description": "Indoor temperature in degrees Celsius (°C), with a resolution better or equal to 1°C",
      "example": 21.5
    }
  },
  "additionalProperties": true
}