diff --git a/deliverables/1 search offers/ContinuousLeg.yaml b/deliverables/1 search offers/ContinuousLeg.yaml new file mode 100644 index 0000000..0b0d421 --- /dev/null +++ b/deliverables/1 search offers/ContinuousLeg.yaml @@ -0,0 +1,23 @@ +allOf: + - $ref: .\Leg.yaml + - type: object + properties: + legType: + type: string + description: discriminator for the leg type + const: continuous + continuousMode: + type: string + enum: [] + duration: + type: integer + description: Duration of the leg in minutes + individualMode: + type: string + enum: [] + start: + type: string + format: place-ref + end: + type: string + format: place-ref \ No newline at end of file diff --git a/deliverables/1 search offers/DistributionFilter.yaml b/deliverables/1 search offers/DistributionFilter.yaml new file mode 100644 index 0000000..d39b4cb --- /dev/null +++ b/deliverables/1 search offers/DistributionFilter.yaml @@ -0,0 +1,63 @@ +allOf: + - $ref: .\SearchOfferFilter.yaml + - type: object + required: + - filterType + - mediaType + properties: + filterType: + type: string + const: distribution + channel: + type: string + description: The channel of the offer. + x-enum-values: + - "web" + - "mobile" + - "kiosk" + - "call center" + - "travel agency" + - "other" + fulfillmentMethod: + type: string + description: The fulfillment method of the offer. + x-enum-values: + - "electronic" + - "paper" + - "mobile" + - "other" + typeOfPayment: + type: string + description: The type of payment of the offer. + x-enum-values: + - "prepaid" + - "postpaid" + - "other" + mediaType: + type: string + description: |- + The media type of the offer. IANA media type registry: https://www.iana.org/assignments/media-types/media-types.xhtml + examples: + - "application/json" + - "application/xml" + - "text/html" + - "application/pdf" + - "image/jpeg" + - "image/svg+xml" + contentStandard: + type: string + description: The content standard of the offer. + x-enum-values: + - "ISO/IEC 18004" # QR Code + - "ISO/IEC 24778" # Aztec Code + - "ISO/IEC 15438" # PDF417 + - "ISO/IEC 16022" # Data Matrix + - "ISO/IEC 15417" # Code 128 + - "ISO/IEC 16388" # Code 39 + - "ISO/IEC 15420" # EAN-13 + - "ISO/IEC 15417" # UPC-A + - "ISO/IEC 15424" # MaxiCode + - "ISO/IEC 7816-4" # NFC, MIFARE DESFire + - "GATT" # Bluetooth Low Energy + - "AXA Bike lock" # AXA Bike lock + - "OTHER" # Other content standard diff --git a/deliverables/1 search offers/FlexibilityFilter.yaml b/deliverables/1 search offers/FlexibilityFilter.yaml new file mode 100644 index 0000000..b9f73ab --- /dev/null +++ b/deliverables/1 search offers/FlexibilityFilter.yaml @@ -0,0 +1,16 @@ +allOf: + - $ref: .\SearchOfferFilter.yaml + - type: object + required: + - filterType + - afterSalesLevel + properties: + filterType: + type: string + const: flexibility + afterSalesLevel: + type: string + enum: + - "cancellable" + - "exchangeable" + - "refundable" diff --git a/deliverables/1 search offers/Leg.yaml b/deliverables/1 search offers/Leg.yaml new file mode 100644 index 0000000..1bbe54f --- /dev/null +++ b/deliverables/1 search offers/Leg.yaml @@ -0,0 +1,31 @@ +type: object +required: + - legId + - mode + - legType +properties: + legId: + type: string + description: Unique identifier for the leg + format: leg-ref + legType: + type: string + description: discriminator for the leg type + enum: [timed, continuous, transfer] + mode: + type: string + description: Mode of transportation for the leg (e.g., bus, train, walking). See modes as specified in NeTEx. + 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. + default: 1 + minimum: 1 + tripPattern: + type: string + format: trip-pattern-ref + description: Reference to the trip pattern that this leg is part of, if applicable. There is no tripPattern object in the data model, + so legs with the same tripPattern reference are considered to be part of the same trip pattern. + examples: + - "inbound-1234" + - "outbound-5678" \ No newline at end of file diff --git a/deliverables/1 search offers/LegAlight.yaml b/deliverables/1 search offers/LegAlight.yaml new file mode 100644 index 0000000..914356c --- /dev/null +++ b/deliverables/1 search offers/LegAlight.yaml @@ -0,0 +1,20 @@ +type: object +required: + - setDownLocation + - arrivalTime +properties: + setDownLocation: + type: string + format: place-ref + description: Reference to the drop-off location for the leg + arrivalTime: + type: string + format: date-time + description: The arrival time at the drop-off location. Local time zone should be used. + stopPointName: + type: string + description: Name of the stop point where the leg ends + stopPointRef: + type: string + format: stop-point-ref + description: Reference to the stop point where the leg ends diff --git a/deliverables/1 search offers/LegBoard.yaml b/deliverables/1 search offers/LegBoard.yaml new file mode 100644 index 0000000..32929cc --- /dev/null +++ b/deliverables/1 search offers/LegBoard.yaml @@ -0,0 +1,26 @@ +type: object +required: + - pickupLocation + - departureTime +properties: + pickupLocation: + type: string + format: place-ref + description: Reference to the pickup location for the leg + departureTime: + type: string + format: date-time + description: The departure time from the pickup location. Local time zone should be used. + stopPointName: + type: string + description: Name of the stop point where the leg starts + stopPointRef: + type: string + format: stop-point-ref + description: Reference to the stop point where the leg starts + trainNumbers: + type: array + items: + type: string + format: train-number + description: List of train numbers associated with this leg, if applicable \ No newline at end of file diff --git a/deliverables/1 search offers/LegIntermediate.yaml b/deliverables/1 search offers/LegIntermediate.yaml new file mode 100644 index 0000000..89923d9 --- /dev/null +++ b/deliverables/1 search offers/LegIntermediate.yaml @@ -0,0 +1,20 @@ +type: object +required: + - arrivalTime + - departureTime +properties: + arrivalTime: + type: string + format: date-time + description: The arrival time at the drop-off location. Local time zone should be used. + departureTime: + type: string + format: date-time + description: The departure time from the stop point. Local time zone should be used. + stopPointName: + type: string + description: Name of the stop point + stopPointRef: + type: string + format: stop-point-ref + description: Reference to the stop point \ No newline at end of file diff --git a/deliverables/1 search offers/Mode.yaml b/deliverables/1 search offers/Mode.yaml new file mode 100644 index 0000000..bcc20c3 --- /dev/null +++ b/deliverables/1 search offers/Mode.yaml @@ -0,0 +1,27 @@ +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, + BUS, + TROLLEYBUS, + TRAM, + COACH, + RAIL, + INTERCITYRAIL, + URBANRAIL, + METRO, + WATER, + CABLEWAY, + FUNICULAR, + TAXI, + SELFDRIVE, + FOOT, + BICYCLE, + MOTORCYCLE, + CAR, + SHUTTLE, + OTHER, + PARKING, + MOPED, + STEP, + FERRY ] \ No newline at end of file diff --git a/deliverables/1 search offers/SearchOfferFilter.yaml b/deliverables/1 search offers/SearchOfferFilter.yaml new file mode 100644 index 0000000..6054505 --- /dev/null +++ b/deliverables/1 search offers/SearchOfferFilter.yaml @@ -0,0 +1,5 @@ +type: object +properties: + exclude: + type: boolean + description: If true, the filter will exclude the specified item instead of including them diff --git a/deliverables/1 search offers/SearchOfferPolicy.yaml b/deliverables/1 search offers/SearchOfferPolicy.yaml new file mode 100644 index 0000000..835e697 --- /dev/null +++ b/deliverables/1 search offers/SearchOfferPolicy.yaml @@ -0,0 +1,15 @@ +type: object +properties: + currency: + type: string + description: The currency code for the search offer request (e.g., USD, EUR) + format: ISO4217 + maxResults: + type: integer + description: Maximum number of results to return for the search offer request + default: 10 + minimum: 1 + allowPartialResults: + type: boolean + description: Whether to allow partial results if the full request cannot be fulfilled + default: false \ No newline at end of file diff --git a/deliverables/1 search offers/SearchOfferRequest.yaml b/deliverables/1 search offers/SearchOfferRequest.yaml new file mode 100644 index 0000000..1954bd2 --- /dev/null +++ b/deliverables/1 search offers/SearchOfferRequest.yaml @@ -0,0 +1,28 @@ +type: object +properties: + searchOfferId: + type: string + description: Unique identifier for the search offer request + format: search-offer-ref + trip: + $ref: .\Trip.yaml + requestedSections: + type: array + items: + $ref: .\TripSection.yaml + policy: + $ref: .\SearchOfferPolicy.yaml + filters: + type: array + items: + oneOf: + - $ref: .\ServiceFilter.yaml + - $ref: .\DistributionFilter.yaml + # - $ref: .\PriceFilter.yaml + # - $ref: .\AreaFilter.yaml + # - $ref: .\TimeFilter.yaml + # - $ref: .\AccessibilityFilter.yaml + # - $ref: .\OperatorFilter.yaml + - $ref: .\FlexibilityFilter.yaml + discriminator: + propertyName: filterType \ No newline at end of file diff --git a/deliverables/1 search offers/ServiceFilter.yaml b/deliverables/1 search offers/ServiceFilter.yaml new file mode 100644 index 0000000..a160ba5 --- /dev/null +++ b/deliverables/1 search offers/ServiceFilter.yaml @@ -0,0 +1,17 @@ +allOf: + - $ref: .\SearchOfferFilter.yaml + - type: object + required: + - filterType + properties: + filterType: + type: string + const: mode + mode: + $ref: .\Mode.yaml + class: + type: string + x-enum-values: + - economy + - business + - first \ No newline at end of file diff --git a/deliverables/1 search offers/TimedLeg.yaml b/deliverables/1 search offers/TimedLeg.yaml new file mode 100644 index 0000000..1742f50 --- /dev/null +++ b/deliverables/1 search offers/TimedLeg.yaml @@ -0,0 +1,36 @@ +allOf: + - $ref: .\Leg.yaml + - type: object + properties: + legType: + type: string + description: discriminator for the leg type + const: timed + journeyRef: + type: string + description: Reference to the journey associated with this leg + format: journey-ref + lineRef: + type: string + description: Reference to the line associated with this leg + format: line-ref + operatingDayRef: + type: string + description: Reference to the operating day associated with this leg + format: day-of-week + enum: [Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday] + privateMode: + type: string + enum: [] + ptMode: + type: string + enum: [] + start: + $ref: .\LegBoard.yaml + end: + $ref: .\LegAlight.yaml + intermediateStops: + type: array + description: List of intermediate stops for this leg + items: + $ref: .\LegIntermediate.yaml \ No newline at end of file diff --git a/deliverables/1 search offers/TransferLeg.yaml b/deliverables/1 search offers/TransferLeg.yaml new file mode 100644 index 0000000..93e0f9c --- /dev/null +++ b/deliverables/1 search offers/TransferLeg.yaml @@ -0,0 +1,23 @@ +allOf: + - $ref: .\Leg.yaml + - type: object + properties: + legType: + type: string + description: discriminator for the leg type + const: transfer + continuousMode: + type: string + enum: [] + duration: + type: integer + description: Duration of the leg in minutes + transferMode: + type: string + enum: [] + start: + type: string + format: place-ref + end: + type: string + format: place-ref \ No newline at end of file diff --git a/deliverables/1 search offers/Trip.yaml b/deliverables/1 search offers/Trip.yaml new file mode 100644 index 0000000..8233dbb --- /dev/null +++ b/deliverables/1 search offers/Trip.yaml @@ -0,0 +1,18 @@ +type: object +required: +- legs +- tripId +properties: + tripId: + type: string + description: Unique identifier for the trip + format: trip-ref + legs: + type: array + items: + oneOf: + - $ref: .\TimedLeg.yaml + - $ref: .\ContinuousLeg.yaml + - $ref: .\TransferLeg.yaml + discriminator: + propertyName: legType diff --git a/deliverables/1 search offers/TripSection.yaml b/deliverables/1 search offers/TripSection.yaml new file mode 100644 index 0000000..7bef2f8 --- /dev/null +++ b/deliverables/1 search offers/TripSection.yaml @@ -0,0 +1,24 @@ +type: object +properties: + startLeg: + type: string + format: leg-ref + startPlace: + type: string + description: The starting place of the trip, which can be a stop or a location. + format: place-ref + endLeg: + type: string + format: leg-ref + endPlace: + type: string + description: The ending place of the trip, which can be a stop or a location. + format: place-ref + tripPattern: + type: string + format: trip-pattern-ref + description: | + Reference to the trip pattern that this trip follows, if applicable. + examples: + - "inbound-1234" + - "outbound-5678" \ No newline at end of file diff --git a/deliverables/1 search offers/search-offers-model.qea b/deliverables/1 search offers/search-offers-model.qea new file mode 100644 index 0000000..ebf4619 Binary files /dev/null and b/deliverables/1 search offers/search-offers-model.qea differ