{
  "$id": "https://schema.nfh.global/DepartureMessage/v2.0",
  "x-iri": "https://schema.nfh.global/DepartureMessage/v2.0",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "DepartureMessage",
  "type": "object",
  "description": "A real-time message containing predicted departure times for vehicles at a stop, as used in VDV real-time standards.",
  "properties": {
    "stopRef": {
      "description": "Reference to the stop for which departures are reported",
      "$ref": "https://schema.nfh.global/Stop/v2.0/schema.json"
    },
    "lineRef": {
      "description": "Reference to the line departing from this stop",
      "$ref": "https://schema.nfh.global/Line/v2.0/schema.json"
    },
    "vehicleRef": {
      "description": "Reference to the departing vehicle",
      "$ref": "https://schema.nfh.global/VehicleDescriptor/v2.0/schema.json"
    },
    "expectedDeparture": {
      "description": "Predicted departure time",
      "type": "string",
      "format": "date-time"
    },
    "delaySeconds": {
      "description": "Delay in seconds relative to scheduled departure",
      "type": "number"
    },
    "id": {
      "description": "Unique identifier for the alert",
      "type": "string"
    },
    "descriptor": {
      "description": "Human-readable description of the alert",
      "$ref": "https://schema.nfh.global/Descriptor/v2.1/schema.json"
    },
    "validity": {
      "description": "Time period during which the alert is active",
      "$ref": "https://schema.nfh.global/TimePeriod/v2.1/schema.json"
    },
    "status": {
      "description": "Current status of the alert",
      "$ref": "https://schema.nfh.global/State/v2.0/schema.json"
    }
  },
  "additionalProperties": false,
  "x-tags": [
    "mobility",
    "ride-hailing"
  ]
}
