Skip to content

Search offers - the 'What' part - Trip based - 20260702#67

Open
edwinvandenbelt wants to merge 1 commit into
mainfrom
deliverables/search-offers-model
Open

Search offers - the 'What' part - Trip based - 20260702#67
edwinvandenbelt wants to merge 1 commit into
mainfrom
deliverables/search-offers-model

Conversation

@edwinvandenbelt

@edwinvandenbelt edwinvandenbelt commented Jun 19, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Adds YAML data model files for the Search Offers deliverable (ContinuousLeg, DistributionFilter, FlexibilityFilter, Leg, LegAlight, LegBoard, LegIntermediate, Mode, SearchOfferFilter, SearchOfferPolicy, SearchOfferRequest, ServiceFilter, TimedLeg, TransferLeg, Trip, TripSection)

The request:
image

The Trip concepts:
image

@edwinvandenbelt edwinvandenbelt changed the title Add search offers deliverables Search offers - the 'What' part - Trip based Jun 22, 2026
@edwinvandenbelt edwinvandenbelt changed the title Search offers - the 'What' part - Trip based Search offers - the 'What' part - Trip based - 20260702 Jun 22, 2026
duration:
type: integer
description: Duration of the leg in minutes
individualMode:

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Ulf9 What is this? I don't see it in TM.

@TuThoThai TuThoThai Jul 2, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be PersonalModeofOperations

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove

individualMode:
type: string
enum: []
start:

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

startPlace?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

keep consistent with TimedLeg

start:
type: string
format: place-ref
end:

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and endPlace?

type: string
description: discriminator for the leg type
const: continuous
continuousMode:

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know this one.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove

mode:
type: string
description: Mode of transportation for the leg (e.g., bus, train, walking). See modes as specified in NeTEx.
enum: []

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be a ref to Mode.yaml

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it would be clearer.

@@ -0,0 +1,28 @@
type: object
properties:
searchOfferId:

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be 'allOf' + request.yaml. The searchOfferId = requestId

description: Reference to the operating day associated with this leg
format: day-of-week
enum: [Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday]
privateMode:

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, what does this mean?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To make consistent with Transmodel: PersonalModesOfOperationEnumeration

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Though it might not be needed in the TimedLeg

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove

privateMode:
type: string
enum: []
ptMode:

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why isn't 'mode' on the Leg level (as specified) enough?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove

type: string
description: discriminator for the leg type
const: transfer
continuousMode:

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And again, I don't know what should be in here. There is already 'mode' at leg level, what does this mode mean?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove

duration:
type: integer
description: Duration of the leg in minutes
transferMode:

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And again, I don't know what should be in here. There is already 'mode' at leg level, what does this mode mean?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove

transferMode:
type: string
enum: []
start:

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

startPlace?

start:
type: string
format: place-ref
end:

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

endPlace?

@OlivierBigex

Copy link
Copy Markdown
Collaborator

If there is a trip pattern section, is the retailer supposed to provide to the distributor the complete trip, even sections that are not covered by the distributor (in case of multi-distributor trip) ?

- "ISO/IEC 7816-4" # NFC, MIFARE DESFire
- "GATT" # Bluetooth Low Energy
- "AXA Bike lock" # AXA Bike lock
- "OTHER" # Other content standard

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is calypso card somewhere in that list ?

- "ISO/IEC 7816-4" # NFC, MIFARE DESFire
- "GATT" # Bluetooth Low Energy
- "AXA Bike lock" # AXA Bike lock
- "OTHER" # Other content standard

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could be interesting to avec an object for the Fulfillment Storage Location (or something more accurate): ON_MEDIA, ON_SYSTEM. Indicating if the ticket is technically stored in the media or in system.

description: The channel of the offer.
x-enum-values:
- "web"
- "mobile"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

app ?

allOf:
- $ref: .\Leg.yaml
- type: object
properties:

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to add:

  • modeOfOperation: enum, to be found in OJP/NeTEx. (fixed)

enum: []
sequenceNumber:
type: integer
description: The order of the leg in the overall journey. In case of parallel legs, the sequence number should be the same for those legs.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Further discussion / modelling is needed on the concept of parallel leg especially if we are taking into account parking

- "application/pdf"
- "image/jpeg"
- "image/svg+xml"
contentStandard:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The client must indicate the technology of issuing:

FulfillmentMediaType: ["ALLOCATOR_APP","DISTRIBUTOR_APP","RETAILER_APP","FULFILLMENT_PARTS","PDF_A4","PKPASS","RCCST","RCT2","UIC_PDF","TICKETLESS","APPLICATION","WALLET","CHIP_CARD"]

The dedicated applications available:
Application: string : this is proprietary coding to be agreed multilateraly with the providers of the applications / specifications

The specification used via the application:
Specification: string : this is proprietary coding to be agreed multilateraly with the providers of the applications / specifications

type: string
description: The content standard of the offer.
x-enum-values:
- "ISO/IEC 18004" # QR Code

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which format the barcode included in a pdf, jpg or wallet fulfillment has is not relevant.

mode:
type: string
description: These classes are taken from the NeTeX standard, but ALL and UNKNOWN are removed. On the other hand OTHER and PARKING are added.
enum: [ AIR,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be extensible

afterSalesLevel:
type: string
enum:
- "cancellable"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is the difference between cancellable and refundable?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LegAlight is used in ScheduledLegs. To include continuous leg data like DownLocation and pickup location there needs to be a ContinuousLeg"Alight".

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LegBoard is used in ScheduledLegs. To include continuous leg data like DownLocation and pickup location there needs to be a ContinuousLegBoard.

type: array
items:
type: string
format: train-number

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is the train-number format?

type: string
format: stop-point-ref
description: Reference to the stop point where the leg starts
trainNumbers:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

regional traffic often uses line numbers instead of train numbers. To be multimodal it should be named vehicleNumbers.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or ServiceJourney/PublicCode according to NeTEx. But shall be definitly multimodal

@@ -0,0 +1,26 @@
type: object
required:
- pickupLocation

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pickupLocation is for continuous legs only

$ref: .\Mode.yaml
class:
type: string
x-enum-values:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

airline categories are of little use. Use rail and public transport classes:

["FIRST","SECOND","ANY_CLASS"]
["BEST","HIGH","STANDARD","BASIC","ANY_CLASS"]

@CGantert345 CGantert345 Jul 7, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a large differece between the trip data in the request and the trip data in the reply. The requested trip data are reduced and only need to describe the trip uniquely whereas the trip in replies includes a lot more details (realtime delay information, platform information, the time format for departure and arrival is different (local date time in requests, UTC with offset in replies). I would suggest to use a TripSpecification, LegSpecification in the request.

type: string
description: discriminator for the leg type
const: timed
journeyRef:

@CGantert345 CGantert345 Jul 7, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The TimedLeg must contain the DatedJourney, a ref does not work.

DatedJourney:
  type: object
  additionalProperties: false
  description: |
    Vehicle journey that runs at a specific date. Provided by OJP.
  required:
    - vehicleNumbers
  properties:
    operatingDayRef:
      $ref: '#/components/schemas/OperationDayRef'
    mode:
      $ref: '#/components/schemas/Mode'
    productCategory:
      $ref: '#/components/schemas/ProductCategory'
    publishedServiceName:
      description: |
        Line name or service description as known to the public, f.e. '512', 'S8'
        or 'Circle Line' or 'ICE 488'.
      type: string
      nullable: true
      example: S1
    vehicleNumbers:
      type: array
      items:
        $ref: '#/components/schemas/VehicleNumber'
      minItems: 1
    lineNumbers:
      type: array
      items:
        $ref: '#/components/schemas/LineNumber'
    serviceStatus:
      $ref: '#/components/schemas/ServiceStatus'
    situationFullRefs:
      type: array
      items:
        $ref: '#/components/schemas/SituationFullRef'
    carriers:
      type: array
      items:
        $ref: '#/components/schemas/NamedCompany'
      minItems: 1
    attributes:
      type: array
      items:
        $ref: '#/components/schemas/GeneralAttribute'

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

serviceDepartureFormation should be added to provide platform information (in the reply)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The list of trip sections for the offers is missing in the SearchOfferFilters

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants