openapi: 3.1.0
info:
  title: DepartureMessage
  version: 2.0.0
  description: Schema definition for the DepartureMessage entity in the Beckn Mobility
  license:
    name: CC-BY-NC-SA 4.0 International
    url: https://creativecommons.org/licenses/by-nc-sa/4.0/deed.en
  contact:
    name: Beckn Labs
    url: https://beckn.io
components:
  schemas:
    DepartureMessage:
      x-iri: https://schema.nfh.global/DepartureMessage/v2.0
      type: object
      title: DepartureMessage
      description: A real-time message containing predicted departure times for vehicles
        at a stop, as used in VDV real-time standards.
      x-tags:
        - mobility
        - ride-hailing
      properties:
        stopRef:
          description: Reference to the stop for which departures are reported
          $ref: https://schema.nfh.global/Stop/v2.0/attributes.yaml#/components/schemas/Stop
        lineRef:
          description: Reference to the line departing from this stop
          $ref: https://schema.nfh.global/Line/v2.0/attributes.yaml#/components/schemas/Line
        vehicleRef:
          description: Reference to the departing vehicle
          $ref: https://schema.nfh.global/VehicleDescriptor/v2.0/attributes.yaml#/components/schemas/VehicleDescriptor
        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.0/attributes.yaml#/components/schemas/Descriptor
        validity:
          description: Time period during which the alert is active
          $ref: https://schema.nfh.global/TimePeriod/v2.0/attributes.yaml#/components/schemas/TimePeriod
        status:
          description: Current status of the alert
          $ref: https://schema.nfh.global/State/v2.0/attributes.yaml#/components/schemas/State
      additionalProperties: false
