{
  "$id": "https://schemas.ruter.no/adt/ota/api/v3.0/sensors/door/door.json",
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "Door",
  "type": "object",
  "required": [
    "traceId",
    "eventTimestamp",
    "doorOpen"
  ],
  "description": "Describes if any door is open (if the door lock is released). Also see topic pe/doors_individually for status on individual doors.",
  "additionalProperties": true,
  "properties": {
    "traceId": {
      "$id": "#/properties/traceId",
      "$comment": "Added in version 2.5",
      "type": "string",
      "description": "A unique identifier to be able to trace this message. Also used to detect duplicate messages received."
    },
    "eventTimestamp": {
      "$id": "#/properties/eventTimestamp",
      "type": "string",
      "description": "As specified in the [ADT documentation.](https://adt.transhub.io). Reflects the current UTC time."
    },
    "messageNumber": {
      "$id": "#/properties/messageNumber",
      "$comment": "Added in version 3.3",
      "type": "number",
      "description": "[Optional] - Sequence number that should generated on the vehicle and increased by one for each new message. Used to validate consistency in the data stream."
    },
    "doorOpen": {
      "$id": "#/properties/doorOpen",
      "type": "boolean",
      "description": "True if any door is open (door lock is released). False if door lock is activated.",
      "examples": [
        "true",
        "false"
      ]
    }
  },
  "examples": [
    {
      "doorOpen": true,
      "atDateTime": "2021-11-30T23:45:52.006Z",
      "traceId": "2d826a9a-2474-11ed-861d-0242ac120002"
    }
  ]
}
