openapi: 3.1.0
info:
  title: MonitoredVehicleJourney
  version: 2.0.0
  description: Schema definition for the MonitoredVehicleJourney entity in the Beckn
  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:
    MonitoredVehicleJourney:
      x-iri: https://schema.nfh.global/MonitoredVehicleJourney/v2.0
      type: object
      title: MonitoredVehicleJourney
      description: A real-time representation of a vehicle journey being actively
        tracked, including position and schedule adherence data.
      x-tags:
        - mobility
        - ride-hailing
      properties:
        lineRef:
          description: Reference to the line being monitored
          $ref: https://schema.nfh.global/Line/v2.0/attributes.yaml#/components/schemas/Line
        directionRef:
          description: Direction of travel being monitored
          $ref: https://schema.nfh.global/Direction/v2.0/attributes.yaml#/components/schemas/Direction
        vehicleRef:
          description: Vehicle assigned to this journey
          $ref: https://schema.nfh.global/Vehicle/v2.0/attributes.yaml#/components/schemas/Vehicle
        vehicleLocation:
          description: Current geographic position of the vehicle
          $ref: https://schema.nfh.global/VehiclePosition/v2.0/attributes.yaml#/components/schemas/VehiclePosition
        bearing:
          description: Compass bearing of travel in degrees
          type: number
        delay:
          description: Delay in seconds relative to schedule (negative = early)
          type: number
        occupancy:
          description: Current passenger occupancy of the vehicle
          $ref: https://schema.nfh.global/OccupancyStatus/v2.0/attributes.yaml#/components/schemas/OccupancyStatus
        vehicleJourneyCode:
          description: Unique code for this vehicle journey
          type: string
        routeRef:
          description: Reference to the route being served
          $ref: https://schema.nfh.global/Route/v2.0/attributes.yaml#/components/schemas/Route
        serviceCalendarRef:
          description: Calendar defining when this journey operates
          $ref: https://schema.nfh.global/ServiceCalendar/v2.0/attributes.yaml#/components/schemas/ServiceCalendar
        patternRef:
          description: Journey pattern being followed
          $ref: https://schema.nfh.global/Pattern/v2.0/attributes.yaml#/components/schemas/Pattern
        stopTimes:
          description: Scheduled stop times for each stop on this journey
          $ref: https://schema.nfh.global/StopTime/v2.0/attributes.yaml#/components/schemas/StopTime
      additionalProperties: false
