Skip to content

TravelDocument does not map to offerIds #41

@jorgenosberg

Description

@jorgenosberg

The current spec does not allow for linking a single TravelDocument to the offer it actually covers. This makes it difficult for implementors to cover all the typical ticketing scenarios in MaaS, especially when related to and understood with #40 in mind:

  • Package contains Offer A and Offer B for Traveller 1, service providers only offer documents for Offer A and Offer B individually
  • Package contains Offer A and Offer B for Traveller 1, implementor can provide one aggregate TravelDocument that covers both offers
  • Package contains Offer A and Offer B for Traveller 1 and Traveller 2, implementor can provide one TravelDocument that covers both travellers and both offers
  • Package contains Offer A and Offer B for Traveller 1 and Traveller 2, service provides only offer group tickets per offer, meaning one TravelDocument to Traveller 1 and Traveller 2 for Offer A, and a separate TravelDocument for Traveller 1 and Traveller 2 for Offer B
travelDocument:
  x-tm: TRAVEL DOCUMENT
  type: object
  required:
    - startValidity
    - endValidity
    - travelDocumentType
    - travellerIds  # <--- Link to traveller(s)
    - offerIds      # <--- Link to offer(s)
  properties:
    travellerIds:
      type: array
      minItems: 1
      description: "References to the traveller(s) authorized by this document."
      items:
        $ref: "#/components/schemas/travellerReference"
    
    offerIds:      # <--- NEW FIELD
      type: array
      minItems: 1
      description: >-
        References to the offer(s) validated by this document. 
      items:
        $ref: "#/components/schemas/offerReference"
        
    # ... existing properties

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions