{
  "$id": "https://schemas.ruter.no/adt/ota/api/v2.1/sensor/odometer.json",
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "Odometer",
  "type": "object",
  "required": [
    "distance",
    "atDateTime"
  ],
  "description": "Odometer data",
  "additionalProperties": true,
  "properties": {
    "distance": {
      "$id": "#/properties/distance",
      "type": "number",
      "description": "Describes absolute odometer value in metres."
    },
    "atDateTime": {
      "$id": "#/properties/atDateTime",
      "type": "string",
      "description": "ISO 8601. Reflects the UTC time when the state changed."
    },
    "messageNumber": {
      "$id": "#/properties/messageNumber",
      "$comment": "Added in version 2.1",
      "type": "number",
      "description": "Optional. Sequence number, increased by one for each new message. Used to validate consistency in the data stream."
    }
  },
  "examples": [
    {
      "distance": 23434556,
      "atDateTime": "2017-11-30T23:45:52.006Z",
      "messageNumber": 12345
    }
  ]
}
