diff --git a/deliverables/1 search offers/AfterSalesFee.yaml b/deliverables/1 search offers/AfterSalesFee.yaml new file mode 100644 index 0000000..510c23f --- /dev/null +++ b/deliverables/1 search offers/AfterSalesFee.yaml @@ -0,0 +1,24 @@ +allOf: +- $ref: .\PackageElement.yaml +- type: object + required: + - packageElementType + properties: + packageElementType: + description: The type of the package element, which can be used to determine the specific schema to use for validation. + type: string + const: afterSalesFee + feeType: + type: string + description: The type of fee applied. + x-enumeration-values: + - TBD + price: + $ref: .\Cost.yaml + description: The fee associated with the after-sales service. This can include costs for cancellations, + exchanges, or other post-purchase services. +example: + { + "packageElementType": "afterSalesFee", + "price": { "amount": 10.00, "currency": "EUR" } + } \ No newline at end of file diff --git a/deliverables/1 search offers/Ancillary.yaml b/deliverables/1 search offers/Ancillary.yaml new file mode 100644 index 0000000..0e393e1 --- /dev/null +++ b/deliverables/1 search offers/Ancillary.yaml @@ -0,0 +1,26 @@ +allOf: +- $ref: .\PackageElement.yaml +- type: object + required: + - ancillaryType + - packageElementType + properties: + packageElementType: + description: The type of the package element, which can be used to determine the specific schema to use for validation. + type: string + const: ancillary + typeOfAncillary: + type: string + description: The type of ancillary service provided. The allowed values are defined in 'ancillary-type' lookup. + appliesTo: + type: array + description: A list of package elements to which this ancillary applies + items: + type: string + format: package-element-ref +examples: +- { + "packageElementType": "ancillary", + "ancillaryType": "meal", + "appliesTo": ["PE-123"] + } \ No newline at end of file diff --git a/deliverables/1 search offers/AssetAllocation.yaml b/deliverables/1 search offers/AssetAllocation.yaml new file mode 100644 index 0000000..5b62ed5 --- /dev/null +++ b/deliverables/1 search offers/AssetAllocation.yaml @@ -0,0 +1,31 @@ +allOf: +- $ref: .\PackageElement.yaml +- type: object + required: + - allocationType + - packageElementType + properties: + packageElementType: + description: The type of the package element, which can be used to determine the specific schema to use for validation. + type: string + const: assetAllocation + typeOfAsset: + type: string + description: The type of asset allocated. The allowed values are defined in 'asset-type' lookup. + description: + type: string + description: A description of the allocation. + reference: + type: string + description: An asset reference identifier for the allocation. + format: asset-ref + numberOfAssets: + type: integer + description: The number of allocated assets for the allocation +examples: +- { + "packageElementType": "assetAllocation", + "typeOfAsset": "normal-bike", + "description": "Normal bike for the trip.", + "numberOfAssets": 2 + } \ No newline at end of file diff --git a/deliverables/1 search offers/ContinuousLeg.yaml b/deliverables/1 search offers/ContinuousLeg.yaml new file mode 100644 index 0000000..a558562 --- /dev/null +++ b/deliverables/1 search offers/ContinuousLeg.yaml @@ -0,0 +1,34 @@ +allOf: + - $ref: .\Leg.yaml + - type: object + properties: + legType: + type: string + description: discriminator for the leg type + const: continuous + duration: + type: integer + description: Duration of the leg in minutes + startPlace: + type: string + format: place-ref + endPlace: + type: string + format: place-ref + timeWindowStart: + type: string + format: date-time + description: The start of the time window during which this continuous leg may be used. + timeWindowEnd: + type: string + format: date-time + description: The end of the time window during which this continuous leg may be used. +examples: +- { + "legType": "continuous", + "duration": 120, + "timeWindowStart": "2024-06-15T08:00:00Z", + "timeWindowEnd": "2024-06-15T10:00:00Z", + "startPlace": "PLACE-123", + "endPlace": "PLACE-456" + } \ No newline at end of file diff --git a/deliverables/1 search offers/Cost.yaml b/deliverables/1 search offers/Cost.yaml new file mode 100644 index 0000000..927630e --- /dev/null +++ b/deliverables/1 search offers/Cost.yaml @@ -0,0 +1,23 @@ +type: object +properties: + amount: + type: number + description: The monetary amount of the cost. + format: float + currencyCode: + type: string + description: The currency of the cost, represented as a three-letter ISO 4217 code + taxes: + type: array + description: A list of taxes associated with the cost. + items: + $ref: .\Tax.yaml +examples: +- { + "amount": 100.00, + "currencyCode": "EUR", + "taxes": [ + { "taxType": "VAT", "amount": 20.00, "currencyCode": "EUR" }, + { "taxType": "Service Tax", "amount": 5.00, "currencyCode": "EUR" } + ] + } \ No newline at end of file diff --git a/deliverables/1 search offers/DatedJourney.yaml b/deliverables/1 search offers/DatedJourney.yaml new file mode 100644 index 0000000..e69de29 diff --git a/deliverables/1 search offers/Delivery.yaml b/deliverables/1 search offers/Delivery.yaml new file mode 100644 index 0000000..ebc5280 --- /dev/null +++ b/deliverables/1 search offers/Delivery.yaml @@ -0,0 +1,21 @@ +type: object +properties: + requestId: + type: string + description: Identifier of the originating request + format: request-ref + problems: + type: array + description: List of problems related to the request + items: + $ref: .\Problem.yaml + warnings: + type: array + description: List of warnings related to the request + items: + $ref: .\Problem.yaml + links: + type: array + description: List of links related to the request + items: + $ref: .\Link.yaml diff --git a/deliverables/1 search offers/DistributionFilter.yaml b/deliverables/1 search offers/DistributionFilter.yaml new file mode 100644 index 0000000..e77ce92 --- /dev/null +++ b/deliverables/1 search offers/DistributionFilter.yaml @@ -0,0 +1,73 @@ +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 + - "CEN/TS 16794" # calypso NFC card + - "GATT" # Bluetooth Low Energy + - "AXA Bike lock" # AXA Bike lock + - "OTHER" # Other content standard +examples: + - { + "filterType": "distribution", + "channel": "web", + "fulfillmentMethod": "electronic", + "typeOfPayment": "prepaid", + "mediaType": "application/json", + "contentStandard": "ISO/IEC 18004" + } \ No newline at end of file diff --git a/deliverables/1 search offers/EntitlementRight.yaml b/deliverables/1 search offers/EntitlementRight.yaml new file mode 100644 index 0000000..640df88 --- /dev/null +++ b/deliverables/1 search offers/EntitlementRight.yaml @@ -0,0 +1,21 @@ +type: object +required: + - issuer + - entitlementType + - code +properties: + issuer: + type: string + description: The entity that issues the entitlement right. Could be a RISC code + entitlementType: + type: string + description: The type of entitlement right (e.g., subscription, license, access). Valid values can be obtained using the `entitlementType` endpoint + code: + type: string + description: A unique code representing the entitlement right. +examples: +- { + "issuer": "Company XYZ", + "entitlementType": "voucher", + "code": "VOUCHER-2024-001" + } \ No newline at end of file diff --git a/deliverables/1 search offers/FlexibilityFilter.yaml b/deliverables/1 search offers/FlexibilityFilter.yaml new file mode 100644 index 0000000..a5bbdb9 --- /dev/null +++ b/deliverables/1 search offers/FlexibilityFilter.yaml @@ -0,0 +1,21 @@ +allOf: + - $ref: .\SearchOfferFilter.yaml + - type: object + required: + - filterType + - afterSalesCondition + properties: + filterType: + type: string + const: flexibility + afterSalesCondition: + type: string + enum: + - cancellable + - exchangeable + - refundable +examples: +- { + "filterType": "flexibility", + "afterSalesCondition": "cancellable" + } \ No newline at end of file diff --git a/deliverables/1 search offers/Fulfillment.yaml b/deliverables/1 search offers/Fulfillment.yaml new file mode 100644 index 0000000..8e6c9fa --- /dev/null +++ b/deliverables/1 search offers/Fulfillment.yaml @@ -0,0 +1,104 @@ +type: object +required: + - fulfillmentId + - status + - mediaType + - packageElements + - oneOf: + - url + - binaryData +properties: + fulfillmentId: + type: string + description: Unique identifier for the fulfillment + status: + type: string + description: The current status of the fulfillment. + enum: + - pending + - in_progress + - completed + - issued + - revoked + - refunded + binaryData: + type: string + format: binary + description: The binary data associated with the fulfillment, which may include documents, tickets, or other relevant files. + url: + type: string + format: uri + description: The URL where the fulfillment can be accessed or downloaded. + 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. + externalDocs: + description: |- + For more information about media types, see the [IANA Media Types](https://www.iana.org/assignments/media-types/media-types.xhtml) registry. + url: 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 + packageElements: + type: array + description: A list of package elements associated with the fulfillment. + minItems: 1 + items: + type: string + format: package-element-ref +examples: +- { + "fulfillmentId": "FULFILLMENT-123", + "status": "revoked", + "mediaType": "application/pdf", + "packageElements": ["PE-123", "PE-456"], + "url": "https://example.com/fulfillment/FULFILLMENT-123", + "contentStandard": "ISO/IEC 18004" + } \ No newline at end of file diff --git a/deliverables/1 search offers/Guarantee.yaml b/deliverables/1 search offers/Guarantee.yaml new file mode 100644 index 0000000..dccc0d4 --- /dev/null +++ b/deliverables/1 search offers/Guarantee.yaml @@ -0,0 +1,58 @@ +type: object +required: + - guaranteeId + - type + - description +properties: + guaranteeId: + type: string + description: The unique identifier of the guarantee + description: + type: string + description: A human-readable description of the guarantee + guaranteeType: + type: string + description: The type of guarantee (e.g., refund, replacement, compensation). Valid values can be obtained using the `guaranteeType` endpoint + x-extensible-enum: [refund, replacement, compensation, travel-through, travel-back] + termsAndConditions: + type: string + description: A URL or reference to the terms and conditions of the guarantee + format: uri + applicableRegulations: + type: array + description: A list of applicable regulations for this guarantee + items: + type: string + x-enum-values: + - EU_PRR # EU Passenger Rights Regulation (EC) No 261/2004 + redresses: + type: array + description: A list of redresses for this guarantee + items: + $ref: .\Redress.yaml + guaranteeFor: + type: array + description: The relevant items where the guarantee applies. This can include specific package elements or trip pattern sections. + If it is absent, the guarantee applies to the entire package. + items: + type: object + properties: + packageElementId: + type: string + format: package-element-ref + section: + $ref: .\TripPatternSection.yaml +examples: +- { + "guaranteeId": "G-123", + "description": "This guarantee provides a refund in case of cancellation.", + "guaranteeType": "refund", + "redresses": [ + { "redressType": "refund", + "amount": 23.00, + "currencyCode": "EUR", + "conditions": "Valid for cancellations made at least 24 hours before departure.", + "temporalValidity": "/2024-06-01T10:13:00Z" + } + ] + } \ No newline at end of file diff --git a/deliverables/1 search offers/Leg.yaml b/deliverables/1 search offers/Leg.yaml new file mode 100644 index 0000000..556363b --- /dev/null +++ b/deliverables/1 search offers/Leg.yaml @@ -0,0 +1,37 @@ +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: + description: Mode of transportation for the leg (e.g., bus, train, walking). See modes as specified in NeTEx. + $ref: .\Mode.yaml + 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 + tripPatternId: + 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" +examples: +- { + "legId": "LEG-123", + "legType": "timed", + "mode": "TRAIN", + "tripPatternId": "inbound-1234" + } \ 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..1ab100e --- /dev/null +++ b/deliverables/1 search offers/LegAlight.yaml @@ -0,0 +1,28 @@ +type: object +required: + - stopPointRef + - stopPointName + - serviceArrivalTimetabledTime +properties: + setDownLocation: + type: string + format: place-ref + description: Reference to the drop-off location for the leg + serviceArrivalTimetabledTime: + 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 +examples: +- { + "setDownLocation": "PLACE-456", + "serviceArrivalTimetabledTime": "2024-06-15T14:30:00Z", + "stopPointName": "Central Station", + "stopPointRef": "STOP-789" + } \ No newline at end of file diff --git a/deliverables/1 search offers/LegBoard.yaml b/deliverables/1 search offers/LegBoard.yaml new file mode 100644 index 0000000..7e16018 --- /dev/null +++ b/deliverables/1 search offers/LegBoard.yaml @@ -0,0 +1,35 @@ +type: object +required: + - stopPointRef + - stopPointName + - serviceDepartureTime +properties: + pickupLocation: + type: string + format: place-ref + description: Reference to the pickup location for the leg + serviceDepartureTime: + 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 +examples: +- { + "pickupLocation": "PLACE-123", + "serviceDepartureTime": "2024-06-15T14:00:00Z", + "stopPointName": "Central Station", + "stopPointRef": "STOP-456", + "trainNumbers": ["1234", "5678"] + } \ 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..793028e --- /dev/null +++ b/deliverables/1 search offers/LegIntermediate.yaml @@ -0,0 +1,29 @@ +type: object +required: + - stopPointRef + - stopPointName + - serviceArrivalTimetabledTime + - serviceDepartureTimetabledTime +properties: + serviceArrivalTimetabledTime: + type: string + format: date-time + description: The arrival time at the drop-off location. Local time zone should be used. + serviceDepartureTimetabledTime: + 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 +examples: +- { + "serviceArrivalTimetabledTime": "2024-06-15T14:00:00Z", + "serviceDepartureTimetabledTime": "2024-06-15T14:06:00Z", + "stopPointName": "Central Station", + "stopPointRef": "STOP-456" + } \ No newline at end of file diff --git a/deliverables/1 search offers/Link.yaml b/deliverables/1 search offers/Link.yaml new file mode 100644 index 0000000..a6dd140 --- /dev/null +++ b/deliverables/1 search offers/Link.yaml @@ -0,0 +1,38 @@ +type: object +externalDocs: + description: Link object definition + url: https://github.com/opengeospatial/ogcapi-processes/blob/master/openapi/schemas/processes-core/link.yaml +required: + - rel + - href +properties: + rel: + type: string + type: + type: string + hreflang: + type: string + title: + type: string + length: + type: integer + href: + type: string + method: + type: string + enum: [ POST, GET, DELETE, PATCH ] + body: + type: object + headers: + type: object + additionalProperties: + type: string +examples: +- { + "rel": "self", + "type": "application/json", + "title": "Self link", + "length": 1234, + "href": "https://api.example.com/resource/1", + "method": "GET" + } \ No newline at end of file diff --git a/deliverables/1 search offers/LockedOfferPackage.yaml b/deliverables/1 search offers/LockedOfferPackage.yaml new file mode 100644 index 0000000..98fba1b --- /dev/null +++ b/deliverables/1 search offers/LockedOfferPackage.yaml @@ -0,0 +1,19 @@ +allOf: + - $ref: ./Package.yaml + - type: object + required: + - expiryTime + properties: + expiryTime: + type: string + format: date-time + description: The time at which this locked offer expires and is no longer available for purchase. + packageType: + type: string + const: locked_offer +examples: +- { + "packageId": "PKG-123", + "expiryTime": "2024-06-15T12:00:00Z", + "packageType": "locked_offer" + } \ 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..a3b2c96 --- /dev/null +++ b/deliverables/1 search offers/Mode.yaml @@ -0,0 +1,26 @@ +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/OfferElementSelection.yaml b/deliverables/1 search offers/OfferElementSelection.yaml new file mode 100644 index 0000000..79855f7 --- /dev/null +++ b/deliverables/1 search offers/OfferElementSelection.yaml @@ -0,0 +1,38 @@ +type: object +required: + - selectionType + - selectableElements +description: A selection of package elements (for a section of a trip pattern). + Each OfferElementSelection is a separate choice (AND construct). + The validity of the selection is equal to the validity of the referred packageElement(s). +properties: + selectionType: + type: string + description: The type of selection that is required (for this section). + enum: [travelRight, ancillary, spotAllocation, assetAllocation] + selectableElements: + type: array + description: List of package elements to select for the section + items: + type: string + format: package-element-ref + minimumNumberOfItems: + type: integer + description: The minimum number of package elements to select for the section + maximumNumberOfItems: + type: integer + description: The maximum number of package elements to select for the section +examples: + - # choose or a normal seat or a luxury seat (mandatory) + { + selectionType: "spotAllocation", + selectableElements: ["NORMAL_SEAT", "LUXURY_SEAT"], + minimumNumberOfItems: 1, + maximumNumberOfItems: 1 + } + - # an optional ancillary, e.g. a meal or a drink + { + selectionType: "ancillary", + selectableElements: ["MEAL"], + maximumNumberOfItems: 1 + } \ No newline at end of file diff --git a/deliverables/1 search offers/OfferedPackage.yaml b/deliverables/1 search offers/OfferedPackage.yaml new file mode 100644 index 0000000..d2776cc --- /dev/null +++ b/deliverables/1 search offers/OfferedPackage.yaml @@ -0,0 +1,103 @@ +allOf: + - $ref: ./Package.yaml + - type: object + required: + - expirationTime + properties: + packageType: + type: string + enum: + - offer + - locked_offer + - expired_offer + - released_offer + matching: + type: string + description: Indicates the matching status of the package. + enum: [match, partial-match] + expirationTime: + type: string + format: date-time + description: The expiration time of the offer. After this time, the package is no longer valid for locking. + selections: + type: array + description: A list of selections that are required for the package, which can include ancillary or allocation options. + items: + $ref: .\OfferElementSelection.yaml + requiredInformation: + description: A list of required information that must be provided by the traveller in order to purchase this package element. + type: array + items: + $ref: .\RequiredInformation.yaml + optionalInformation: + description: A list of optional information that can be provided by the traveller in order to purchase this package element. + type: array + items: + $ref: .\OptionalInformation.yaml +example: + { + "packageId": "pkg-123", + "summary": "This is a sample offered package.", + "name": "Sample Package", + "packageType": "offer", + "minimumPrice": { "amount": 45.00, "currencyCode": "EUR" }, + "trip": { + "tripId": "trip-456", + "legs": [ + { "legId": "L-789", + "legType": "timed", + "journeyRef": "journey-789", + "operatingDayRef": "Monday", + "start": { "stopPointRef": "stop-001", "departureTime": "2024-06-01T08:00:00Z" }, + "end": { "stopPointRef": "stop-002", "arrivalTime": "2024-06-01T10:00:00Z" } + }, + { "legId": "T-43294028", + "legType": "transfer", + "duration": 5, + "mode": "FOOT" + }, + { "legId": "L-349", + "legType": "timed", + "journeyRef": "journey-349", + "operatingDayRef": "Monday", + "start": { "stopPointRef": "stop-002", "departureTime": "2024-06-01T10:24:00Z" }, + "end": { "stopPointRef": "stop-004", "arrivalTime": "2024-06-01T12:10:00Z" } + } + ] + }, + "elements": [ + { "packageElementType": "travelRight", + "packageElementId": "PE-123", + "coverage": [ { "startLeg": "L-789", "endLeg": "L-349" } ], + "price": { "amount": 45.00, "currencyCode": "EUR" }, + "product": { "productId": "PR-456", "name": "Second class" }, + "travellingEntities": [ "TE-123", "TE-456" ] + }, + { "packageElementType": "ancillary", + "packageElementId": "ANC-123", + "price": { "amount": 10.00, "currencyCode": "EUR" }, + "coverage": [ { "startLeg": "L-789", "endLeg": "L-789" } ], + "product": { "productId": "PR-789", "name": "Meal" } + }, + { "packageElementType": "ancillary", + "packageElementId": "ANC-456", + "price": { "amount": 15.00, "currencyCode": "EUR" }, + "coverage": [ { "startLeg": "L-789", "endLeg": "L-789" } ], + "product": { "productId": "PR-3498", "name": "Luxurious meal A" } + } + ], + "selections": [ + { + "selectionType": "ancillary", + "selectableElements": [ "ANC-123", "ANC-456" ], + "minimumNumberOfItems": 0, + "maximumNumberOfItems": 2 + } + ], + "requiredInformation": [ + { "requiredInformation": ["fullName"], + "travellingEntityIds": ["PE-123"] + } + ] + } + diff --git a/deliverables/1 search offers/OptionalInformation.yaml b/deliverables/1 search offers/OptionalInformation.yaml new file mode 100644 index 0000000..754ec0c --- /dev/null +++ b/deliverables/1 search offers/OptionalInformation.yaml @@ -0,0 +1,24 @@ +type: object +required: + - informationId + - description +properties: + informationId: + type: string + description: Unique identifier for this optional information item. + description: + type: string + description: A description of the optional information that can be provided by the traveller before purchase. + optionalInformation: + type: string + description: >- + The type of optional information to supply before purchase, + e.g. to obtain a discount or to provide additional context for the service provider. + x-extensible-enum: + - voucher +examples: +- { + "informationId": "OI-001", + "description": "Provide a voucher code to obtain a discount.", + "optionalInformation": "voucher" + } \ No newline at end of file diff --git a/deliverables/1 search offers/Package.yaml b/deliverables/1 search offers/Package.yaml new file mode 100644 index 0000000..9cc860a --- /dev/null +++ b/deliverables/1 search offers/Package.yaml @@ -0,0 +1,116 @@ +type: object +required: + - packageId + - summary + - name + - matching + - status + - version +properties: + packageId: + type: string + description: Unique identifier for the package + version: + type: string + description: > + The version of the package, which can be used for version control and tracking changes over time. + Avoid using an increasing integer as the version number, as it may not accurately reflect the content changes. + Instead, consider using a hash of the package content or a combination of an internal ID and version number + to ensure uniqueness and integrity. + summary: + type: string + description: A brief summary of the package, providing an overview of its contents or purpose. + name: + type: string + description: The name of the package, which can be used for display purposes in user interfaces. + packageType: + type: string + description: The type of the package. + x-enum-values: + - offer + - locked_offer + - expired_offer + - released_offer + - purchased_package + - rollbacked_package + - cancelled_package + - fulfilled_package + elements: + type: array + description: A list of elements that are part of the package + items: + oneOf: + - $ref: .\TravelRight.yaml + - $ref: .\Ancillary.yaml + - $ref: .\SpotAllocation.yaml + - $ref: .\AssetAllocation.yaml + - $ref: .\AfterSalesFee.yaml + discriminator: + propertyName: packageElementType + mapping: + travelRight: .\TravelRight.yaml + ancillary: .\Ancillary.yaml + spotAllocation: .\SpotAllocation.yaml + assetAllocation: .\AssetAllocation.yaml + afterSalesFee: .\AfterSalesFee.yaml + travellingEntities: + type: array + description: A list of travelling entities associated with the package. + items: + $ref: .\TravellingEntity.yaml + minimumPrice: + $ref: .\Cost.yaml + summaryDetails: + type: array + description: A list of detailed summaries related to the package, providing additional context or information. + items: + $ref: .\SummaryDetail.yaml + trip: + $ref: .\Trip.yaml + guarantees: + type: array + description: A list of guarantees + items: + $ref: .\Guarantee.yaml + # links: + # type: array + # description: A list of links related to the package, which can provide additional information or actions. + # items: + # $ref: .\Link.yaml + # moved to the response! +example: + { + "packageId": "PK-123", + "summary": "This is a sample package.", + "name": "Sample Package", + "matching": "match", + "minimumPrice": { "amount": 100.00, "currencyCode": "USD" }, + "summaryDetails": [ + { + "detailType": "geospatial-condition", + "description": "A route from San Francisco to Los Angeles.", + "geospatialValidity": { "type": "Feature", "geometry": { "type": "LineString", "coordinates": [[-122.4194, 37.7749], [-118.2437, 34.0522]] } } + }, + { + "detailType": "other-condition", + "description": "No pets allowed" + } + ], + "elements": [ + { + "elementType": "travelRight", + "elementId": "PE-123", + "coverage": [ { "startLeg": "L-789", "endLeg": "L-789" } ], + "price": { "amount": 23.20, "currencyCode": "EUR" }, + "travellingEntities": [ "TE-123", "TE-456" ], + + }, + { + "elementType": "spotAllocation", + "elementId": "PE-124", + "typeOfSpot": "seat", + "numberOfAllocatedUnits": 1, + "coverage": [ { "startLeg": "L-789", "endLeg": "L-789" } ] + } + ] + } \ No newline at end of file diff --git a/deliverables/1 search offers/PackageElement.yaml b/deliverables/1 search offers/PackageElement.yaml new file mode 100644 index 0000000..5ff8782 --- /dev/null +++ b/deliverables/1 search offers/PackageElement.yaml @@ -0,0 +1,42 @@ +type: object +required: + - packageElementId + - packageElementType + - status +properties: + packageElementId: + description: Unique identifier for the package element + type: string + packageElementType: + description: The type of the package element, which can be used to determine the specific schema to use for validation. + type: string + enum: [travelRight, ancillary, spotAllocation, assetAllocation, afterSalesFee] + coverage: + type: array + description: A list of trip sections that are covered by this package element. If absent, the package element is considered to be valid for the entire requested trip. + items: + $ref: .\TripPatternSection.yaml + price: + description: The price of this package element + $ref: .\Cost.yaml + product: + description: The product associated with this package element + $ref: .\Product.yaml + travellingEntities: + type: array + description: A list of travelling entities associated with this package element. If absent, the package element is considered to be valid for all travelling entities. + items: + type: string + format: travelling-entity-ref + status: + type: string + description: The status of the package element, which can be used to determine its availability or validity. + enum: [offered, locked, expired, released, purchased, rollbacked, cancelled, fulfilled, refunded, exchanged, exchange_ongoing, error] +examples: + - { "packageElementId": "PE-123", + "packageElementType": "travelRight", + "status": "offered", + "coverage": [ { "startLeg": "L-789", "endLeg": "L-789" } ], + "price": { "amount": 23.20, "currencyCode": "EUR" }, + "travellingEntities": [ "TE-123", "TE-456" ] + } diff --git a/deliverables/1 search offers/Problem.yaml b/deliverables/1 search offers/Problem.yaml new file mode 100644 index 0000000..e45820b --- /dev/null +++ b/deliverables/1 search offers/Problem.yaml @@ -0,0 +1,35 @@ +type: object +externalDocs: + url: https://datatracker.ietf.org/doc/html/rfc7807 +additionalProperties: false +description: | + An error that the service may send, e.g. in case of invalid input, based on RFC 7807 +required: + - title +properties: + type: + type: string + format: uri + description: URI specifying the problem type. When dereferenced, it SHOULD provide human-readable documentation for the problem type (e.g., using HTML [W3C.REC-html5-20141028]). When this member is not present, its value is assumed to be "about:blank". + title: + type: string + description: A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except to match Content-Language + status: + type: integer + description: HTTP-statuscode, The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem. + example: 501 + detail: + type: string + description: A human-readable explanation specific to this occurrence of the problem, matches Content-Language + instance: + type: string + format: uri + description: A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced. +examples: +- { + "type": "https://example.com/probs/out-of-credit", + "title": "You do not have enough credit.", + "status": 403, + "detail": "Your current balance is 30, but that costs 50.", + "instance": "/account/12345/msgs/abc" +} \ No newline at end of file diff --git a/deliverables/1 search offers/Product.yaml b/deliverables/1 search offers/Product.yaml new file mode 100644 index 0000000..4d9c511 --- /dev/null +++ b/deliverables/1 search offers/Product.yaml @@ -0,0 +1,11 @@ +type: object +required: + - description + - productId +properties: + productId: + type: string + description: The unique identifier of the product + description: + type: string + description: A human-readable description of the product diff --git a/deliverables/1 search offers/PurchasedPackage.yaml b/deliverables/1 search offers/PurchasedPackage.yaml new file mode 100644 index 0000000..4d7b9ee --- /dev/null +++ b/deliverables/1 search offers/PurchasedPackage.yaml @@ -0,0 +1,31 @@ +allOf: + - $ref: ./Package.yaml + - type: object + properties: + packageType: + type: string + enum: + - purchased_package + - rollbacked_package + - cancelled_package + - fulfilled_package + fulfillments: + type: array + items: + $ref: .\Fulfillment.yaml +examples: + - { + "packageId": "PKG-123", + "packageType": "purchased_package", + "fulfillments": + [ + { + "fulfillmentId": "FULFILLMENT-123", + "status": "revoked", + "mediaType": "application/pdf", + "packageElements": ["PE-123", "PE-456"], + "url": "https://example.com/fulfillment/FULFILLMENT-123", + "contentStandard": "ISO/IEC 18004", + }, + ], + } diff --git a/deliverables/1 search offers/Redress.yaml b/deliverables/1 search offers/Redress.yaml new file mode 100644 index 0000000..cc96ce2 --- /dev/null +++ b/deliverables/1 search offers/Redress.yaml @@ -0,0 +1,17 @@ +type: object +required: + - redressId + - redressType + - description +properties: + redressId: + type: string + description: An identifier for the redress + description: + type: string + description: A human-readable description of the redress + redressType: + type: string + x-extensible-enum: [] +examples: +- { redressId: "12345", description: "Refund for overcharge", redressType: "refund" } \ No newline at end of file diff --git a/deliverables/1 search offers/Request.yaml b/deliverables/1 search offers/Request.yaml new file mode 100644 index 0000000..424718e --- /dev/null +++ b/deliverables/1 search offers/Request.yaml @@ -0,0 +1,7 @@ +type: object +required: + - requestId +properties: + requestId: + type: string + description: Unique identifier for the request \ No newline at end of file diff --git a/deliverables/1 search offers/RequiredInformation.yaml b/deliverables/1 search offers/RequiredInformation.yaml new file mode 100644 index 0000000..a684b7f --- /dev/null +++ b/deliverables/1 search offers/RequiredInformation.yaml @@ -0,0 +1,69 @@ +type: object +required: + - fields + - description +description: >- + A list of required information that must be provided by the traveller in order to book this package element + In e.g. one of the amend-operations, in the validation or in the purchase itself (TBD) +properties: + fields: + type: array + description: A list of required information that must be provided by the traveller in order to book this package element + items: + type: string + x-extensible-enum: + - fullName + - firstName + - lastName + - dateOfBirth + - gender + - nationality + - email + - address + - phoneNumber + - passportNumber + - passportExpiryDate + - passportIssuingCountry + - idCardNumber + - idCardExpiryDate + - idCardIssuingCountry + - drivingLicenseNumber + - drivingLicenseExpiryDate + - drivingLicenseIssuingCountry + - width + - height + - length + - weight + - confirmation + description: + type: string + description: A description of the required information that must be provided by the traveller in order to book this package element + travellingEntityIds: + description: >- + The travelling entities for which this required information is applicable, in case not all travelling entities + within the package element need to supply the required information. If absent, it is assumed that all + travelling entities within the package element need to supply the required information. + type: array + items: + type: string + format: travelling-entity-ref + minimumNumberOfItems: + type: integer + description: The minimum number of items that must be provided for this required information. + validation: + type: string + description: The validation rules or constraints for the required information, expressed in JSONPath format + examples: + - { + "fields": ["fullName"], + } + - { + "fields": ["confirmation"], + "travellingEntityIds": ["TE-123"], + } + - # to indicate that at least the email or mobile number of the travelling entity with id TE-123 must be provided + { + "fields": ["email", "mobileNumber"], + "travellingEntityIds": ["TE-123"], + "minimumNumberOfItems": 1 + } diff --git a/deliverables/1 search offers/SearchOfferDelivery.yaml b/deliverables/1 search offers/SearchOfferDelivery.yaml new file mode 100644 index 0000000..a2a8a19 --- /dev/null +++ b/deliverables/1 search offers/SearchOfferDelivery.yaml @@ -0,0 +1,9 @@ +allOf: + - $ref: ./Delivery.yaml + - type: object + properties: + offers: + type: array + description: List of sales offers included in the delivery + items: + $ref: ./OfferedPackage.yaml \ 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..cce24a2 --- /dev/null +++ b/deliverables/1 search offers/SearchOfferFilter.yaml @@ -0,0 +1,9 @@ +type: object +properties: + description: + type: string + description: A description of the filter, providing context or details about its purpose. + exclude: + type: boolean + default: false + description: If true, the filter will exclude the specified item instead of including them diff --git a/deliverables/1 search offers/SearchOfferRequest.yaml b/deliverables/1 search offers/SearchOfferRequest.yaml new file mode 100644 index 0000000..4ae4be6 --- /dev/null +++ b/deliverables/1 search offers/SearchOfferRequest.yaml @@ -0,0 +1,31 @@ +allOf: +- $ref: .\Request.yaml +- type: object + properties: + trip: + $ref: .\Trip.yaml + context: + $ref: .\TripContext.yaml + requestedSections: + type: array + items: + $ref: .\TripPatternSection.yaml + travellingEntities: + type: array + description: A list of travelling entities associated with the package. + items: + $ref: .\TravellingEntity.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..22d8c89 --- /dev/null +++ b/deliverables/1 search offers/ServiceFilter.yaml @@ -0,0 +1,21 @@ +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 + - second + - premium +examples: +- { filterType: "mode", mode: "RAIL", class: "economy" } \ No newline at end of file diff --git a/deliverables/1 search offers/SpotAllocation.yaml b/deliverables/1 search offers/SpotAllocation.yaml new file mode 100644 index 0000000..67918f3 --- /dev/null +++ b/deliverables/1 search offers/SpotAllocation.yaml @@ -0,0 +1,32 @@ +allOf: +- $ref: .\PackageElement.yaml +- type: object + required: + - packageElementType + - typeOfSpot + properties: + packageElementType: + description: The type of the package element, which can be used to determine the specific schema to use for validation. + type: string + const: spotAllocation + typeOfSpot: + type: string + description: The type of spot allocated. + x-enum : [seat, berth, other] + description: + type: string + description: A description of the allocation. + reference: + type: string + description: A spot reference identifier for the allocation. + format: spot-ref + numberOfSpots: + type: integer + description: The number of allocated spots for the allocation. +examples: +- { + "packageElementType": "spotAllocation", + "typeOfSpot": "seat", + "description": "Allocated seat for the trip.", + "numberOfSpots": 1 + } \ No newline at end of file diff --git a/deliverables/1 search offers/SummaryDetail.yaml b/deliverables/1 search offers/SummaryDetail.yaml new file mode 100644 index 0000000..c7e5fe6 --- /dev/null +++ b/deliverables/1 search offers/SummaryDetail.yaml @@ -0,0 +1,108 @@ +type: object +required: + - summaryLevel + - summaryType + - summaryClassification + - description +description: should we include all Transmodel validities in here? +properties: + summaryLevel: + type: string + enum: [package, package_element, product] + summaryType: + type: string + enum: [refund_condition, exchange_condition, reusable_condition, other_condition, travel_condition] + summaryClassification: + type: string + enum: [information, mandatory, mandatory_with_confirmation, ticket_validity] + description: + type: string + description: A human-readable description of the detail or condition, providing context or additional information. + geospatialValidity: + type: object + format: geojson-feature + description: A representation of the geometric shape of the trip, such as a route or area. + temporalValidity: + type: string + format: period + description: The duration for which the flexibility filter is valid. ISO 8601 period format is used. + examples: + - "2026-01-01T00:00:00Z/P1D" # Valid for one day from January 1, 2026 + - "2026-01-01T12:00:00Z/2026-01-02T12:00:00Z" # Valid for one day from January 1, 2026 + packageElements: + type: array + items: + type: string + format: package-element-ref + products: + type: array + items: + type: string + format: product-ref + fee: + allOf: + - $ref: .\Cost.yaml + - type: object + description: The fee associated with the detail or condition, if applicable. + properties: + recurring: + type: string + description: ISO 8601 recurring interval format, indicating if the fee is recurring. + example: R/PT10M +examples: +- { + "summaryLevel": "package", + "summaryType": "travel-condition", + "summaryClassification": "information", + "description": "You can travel within the city centre of Amersfoort.", + "geospatialValidity": { "type": "Feature", "geometry": { "type": "Polygon", "coordinates": [[[5.387, 52.156], [5.387, 52.157], [5.388, 52.157], [5.388, 52.156], [5.387, 52.156]]] } } + } +- { + "summaryLevel": "package_element", + "summaryType": "travel-condition", + "summaryClassification": "mandatory", + "description": "You can travel until 8 PM. After that, you will be charged an additional fee of 10 EUR per hour.", + "temporalValidity": "/2024-06-01T20:00:00Z", + "packageElements": ["PE-123"], + "fee": { "amount": 10.00, "currency": "EUR", "recurring": "R/PT1H" } + } +- { + "summaryLevel": "package", + "summaryType": "exchange-condition", + "summaryClassification": "information", + "description": "Exchanges are available, made at least 24 hours before departure.", + "temporalValidity": "/2024-06-01T10:13:00Z", + "fee": { "amount": 5.00, "currency": "EUR" } + } +- { + "summaryLevel": "package", + "summaryType": "refund-condition", + "summaryClassification": "information", + "description": "(Partial) refunds are available", + "packageElements": ["PE-456"], + "temporalValidity": "/2024-06-01T10:13:00Z", + "fee": { "amount": 3.00, "currency": "EUR" } + } +- { + "summaryLevel": "package", + "summaryType": "refund-condition", + "summaryClassification": "information", + "description": "No refunding available within the last 24 hours before departure.", + "packageElements": ["PE-456"], + "temporalValidity": "2024-06-01T10:13:00Z/", + "fee": { "amount": 23.25, "currency": "EUR" } + } +- { + "summaryLevel": "package", + "summaryType": "other-condition", + "summaryClassification": "information", + "description": "No pets allowed", + "packageElements": ["PE-123", "PE-456"] + } +- { + "summaryLevel": "package", + "summaryType": "travel-condition", + "summaryClassification": "information", + "description": "Bikes only allowed outside peak hours", + "fee": { "amount": 12.50, "currency": "EUR" }, + } \ No newline at end of file diff --git a/deliverables/1 search offers/Tax.yaml b/deliverables/1 search offers/Tax.yaml new file mode 100644 index 0000000..19ec2d6 --- /dev/null +++ b/deliverables/1 search offers/Tax.yaml @@ -0,0 +1,31 @@ +type: object +required: + - amount + - currencyCode +properties: + taxType: + type: string + description: The type of tax applied to the cost. + enum: + - VAT + - Service Tax + - Other + amount: + type: number + description: The monetary amount of the cost. + format: float + currencyCode: + type: string + description: The currency code of the cost, represented as a three-letter ISO 4217 code + country: + type: string + description: The country associated with the tax, represented as a two-letter ISO 3166-1 alpha-2 code + description: + type: string + description: A description of the tax. + percentage: + type: number + description: The percentage of the tax applied to the cost. + format: double +examples: +- { amount: 5.00, country: "US", "taxType": "VAT", currencyCode: "USD", percentage: 10.0 } \ 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..620e9f8 --- /dev/null +++ b/deliverables/1 search offers/TimedLeg.yaml @@ -0,0 +1,57 @@ +allOf: + - $ref: .\Leg.yaml + - type: object + required: + - legType + - service + - start + - end + properties: + legType: + type: string + description: discriminator for the leg type + const: timed + service: + $ref: .\DatedJourney.yaml + start: + $ref: .\LegBoard.yaml + end: + $ref: .\LegAlight.yaml + intermediateStops: + type: array + description: List of intermediate stops for this leg + items: + $ref: .\LegIntermediate.yaml +examples: + - { + legType: "timed", + "tripPatternId": "outbound-1", + "service": { + "journeyRef": "journey-123", + "lineRef": "line-456", + "operatingDayRef": "2024-06-15", + "directionRef": "outbound", + "publishedServiceName": "Intercity 1234", + "operatorRefs": ["NS"], + "destinationStopPointRef": "stop-100", + "productCategory": "IC" + }, + "start": { + "stopPointRef": "STOP-456", + "stopPointName": "Amsterdam Centraal", + "serviceDepartureTime": "2024-06-15T14:00:00Z" + }, + "end": { + "stopPointRef": "STOP-789", + "stopPointName": "Utrecht Centraal", + "serviceArrivalTimetabledTime": "2024-06-15T14:28:00Z" + }, + "intermediateStops": [ + { + "stopPointRef": "STOP-500", + "stopPointName": "Amstel", + "serviceArrivalTimetabledTime": "2024-06-15T14:10:00Z", + "serviceDepartureTimetabledTime": "2024-06-15T14:11:00Z" + } + ] + } diff --git a/deliverables/1 search offers/TransferLeg.yaml b/deliverables/1 search offers/TransferLeg.yaml new file mode 100644 index 0000000..0d2ea72 --- /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 + duration: + type: string + description: Duration of the leg in minutes (ISO 8601 duration format, e.g., "PT10M" for 10 minutes). + start: + type: string + format: place-ref + end: + type: string + format: place-ref +examples: + - { + legType: "transfer", + duration: "PT10M", + mode: "WALK" + } \ No newline at end of file diff --git a/deliverables/1 search offers/TravelParty.yaml b/deliverables/1 search offers/TravelParty.yaml new file mode 100644 index 0000000..418dc86 --- /dev/null +++ b/deliverables/1 search offers/TravelParty.yaml @@ -0,0 +1,14 @@ +type: object +required: + - travelPartyId +description: >- + TRAVEL PARTY — a group of travelling entities that are travelling together. The travel party can be used to apply group + discounts or other offers. Travelling entities with the same travelPartyId are considered to be part of the same travel party. +properties: + travelPartyId: + type: string + type: + type: string + x-extensible-enum: [family, group, individual] +examples: +- { travelPartyId: "party123", type: "family" } \ No newline at end of file diff --git a/deliverables/1 search offers/TravelRight.yaml b/deliverables/1 search offers/TravelRight.yaml new file mode 100644 index 0000000..fcfc3f0 --- /dev/null +++ b/deliverables/1 search offers/TravelRight.yaml @@ -0,0 +1,16 @@ +allOf: +- $ref: .\PackageElement.yaml +- type: object + properties: + packageElementType: + description: The type of the package element, which can be used to determine the specific schema to use for validation. + type: string + const: travelRight + examples: + - { packageElementType: "travelRight", + packageElementId: "PE-123", + coverage: [ { startLeg: "L-789", endLeg: "L-789" } ], + price: { amount: 23.20, currency: "EUR" }, + product: { productId: "PR-456", name: "Second class" }, + travellingEntities: [ "TE-123", "TE-456" ] + } \ No newline at end of file diff --git a/deliverables/1 search offers/TravellingEntity.yaml b/deliverables/1 search offers/TravellingEntity.yaml new file mode 100644 index 0000000..d6939ff --- /dev/null +++ b/deliverables/1 search offers/TravellingEntity.yaml @@ -0,0 +1,31 @@ +type: object +description: TRAVELLING ENTITY — base class for all entities taking part in a journey. Use the entityType discriminator to select the concrete sub-type. +required: +- entityType +- travellingEntityId +properties: + entityType: + type: string + enum: + - traveller + - passengerVehicle + - animal + - luggage + description: Discriminator identifying the concrete type of this entity. + travellingEntityId: + type: string + description: Stable caller-assigned identifier for this entity. Must be unique within the request. + format: travelling-entity-ref + entitlementRights: + type: array + description: ENTITLEMENT RIGHTs held by this entity that may qualify for reduced fares or additional offers. + items: + $ref: .\EntitlementRight.yaml + travelParty: + $ref: .\TravelParty.yaml +examples: + - { "travellingEntityId": "TE-123", + "entityType": "traveller", + "entitlementRights": [ { "entitlementRightId": "ER-456", "description": "Senior citizen discount" } ], + "travelParty": { "travelPartyId": "TP-789", "type": "family" } + } \ 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..a84f949 --- /dev/null +++ b/deliverables/1 search offers/Trip.yaml @@ -0,0 +1,22 @@ +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 + mapping: + timed: .\TimedLeg.yaml + continuous: .\ContinuousLeg.yaml + transfer: .\TransferLeg.yaml diff --git a/deliverables/1 search offers/TripContext.yaml b/deliverables/1 search offers/TripContext.yaml new file mode 100644 index 0000000..8963031 --- /dev/null +++ b/deliverables/1 search offers/TripContext.yaml @@ -0,0 +1,21 @@ +type: object +properties: + currency: + type: string + description: The currency code for the search offer request (e.g., USD, EUR) + format: ISO4217 + # TBD: adding the place structure + # places: + # type: array + # items: + # oneOf: + # - $ref: .\Place.yaml + 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/TripPatternSection.yaml b/deliverables/1 search offers/TripPatternSection.yaml new file mode 100644 index 0000000..837dac1 --- /dev/null +++ b/deliverables/1 search offers/TripPatternSection.yaml @@ -0,0 +1,33 @@ +type: object +required: + - startLeg +properties: + startLeg: + type: string + format: leg-ref + description: in case the trip section covers a complete leg, no other details are needed. + 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" +examples: + - { startLeg: "L-789", + startPlace: "PLACE-123", + endLeg: "L-3409", + endPlace: "PLACE-456", + tripPattern: "inbound-1234" } \ 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 diff --git a/wiki/specifications/OSDM 3.7.1.yaml b/wiki/specifications/OSDM 3.7.1.yaml index bf23a3b..446ea75 100644 --- a/wiki/specifications/OSDM 3.7.1.yaml +++ b/wiki/specifications/OSDM 3.7.1.yaml @@ -30084,10 +30084,10 @@ components: conditions: - 'No direct Transmodel equivalent: property has no counterpart in the matched Transmodel class' - tripSections: + sections: type: array items: - $ref: '#/components/schemas/TripSection' + $ref: '#/components/schemas/TripPatternSection' x-semantics: Transmodel: concepts: