openapi: 3.1.0
info:
  title: VehicleJourney
  version: 2.0.0
  description: Schema definition for the VehicleJourney 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:
    VehicleJourney:
      x-iri: https://schema.nfh.global/VehicleJourney/v2.0
      type: object
      title: VehicleJourney
      description: A specific operational instance of a vehicle traveling a defined
        route at a scheduled time on a given service day.
      x-tags:
        - mobility
        - transmodel-netex
        - ride-hailing
      properties:
        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
        vehicleRef:
          description: Vehicle assigned to this journey
          $ref: https://schema.nfh.global/Vehicle/v2.0/attributes.yaml#/components/schemas/Vehicle
        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
        id:
          description: Unique identifier for the fulfillment
          type: string
        type:
          description: Type of fulfillment (extensible term)
          type: string
        agent:
          description: The entity responsible for performing the fulfillment
          $ref: https://schema.nfh.global/FulfillmentAgent/v2.0/attributes.yaml#/components/schemas/FulfillmentAgent
        mode:
          description: Mode of fulfillment
          $ref: https://schema.nfh.global/FulfillmentMode/v2.0/attributes.yaml#/components/schemas/FulfillmentMode
        participants:
          description: Participants entitled to receive this fulfillment
          $ref: https://schema.nfh.global/Participant/v2.0/attributes.yaml#/components/schemas/Participant
        stages:
          description: Stages in the fulfillment lifecycle
          $ref: https://schema.nfh.global/FulfillmentStage/v2.0/attributes.yaml#/components/schemas/FulfillmentStage
        instructions:
          description: Instructions for fulfillment
          $ref: https://schema.nfh.global/Descriptor/v2.0/attributes.yaml#/components/schemas/Descriptor
      additionalProperties: false
