UNPKG

db-vendo-client

Version:
1,712 lines (1,710 loc) 71.8 kB
openapi: 3.0.3 info: title: db-vendo-client description: Schema for db-vendo-client/hafas-rest-api's Friendly Public Transport Format REST API contact: url: https://github.com/public-transport/db-vendo-client version: '6' paths: /stops/{id}: get: summary: Finds a stop/station by ID. description: Uses [`hafasClient.stop()`](https://github.com/public-transport/hafas-client/blob/6/docs/stop.md) to **find a stop/station by ID**. externalDocs: description: '`hafasClient.stop()` documentation' url: https://github.com/public-transport/hafas-client/blob/6/docs/stop.md parameters: - name: id in: path description: stop/station ID required: true schema: type: string - name: linesOfStops in: query description: Parse & expose lines at each stop/station? schema: type: boolean default: false - name: language in: query description: Language of the results. schema: type: string default: en - name: pretty in: query description: Pretty-print JSON responses? schema: type: boolean responses: 2XX: description: The stop, in the [`hafas-client` format](https://github.com/public-transport/hafas-client/blob/6/docs/stop.md). content: application/json: schema: anyOf: - $ref: '#/components/schemas/Location' - $ref: '#/components/schemas/Station' - $ref: '#/components/schemas/Stop' /stops/{id}/departures: get: summary: Fetches departures at a stop/station. description: Uses [`hafasClient.departures()`](https://github.com/public-transport/hafas-client/blob/6/docs/departures.md) to **query departures at a stop/station**. externalDocs: description: '`hafasClient.departures()` documentation' url: https://github.com/public-transport/hafas-client/blob/6/docs/departures.md parameters: - name: id in: path description: stop/station ID to show departures for required: true schema: type: string - name: when in: query description: 'Date & time to get departures for. – Default: *now*' schema: type: string format: date-time - name: direction in: query description: not supported schema: type: string - name: duration in: query description: Show departures for how many minutes? schema: type: integer default: 10 - name: results in: query description: 'Max. number of departures. – Default: *whatever HAFAS wants' schema: type: integer - name: linesOfStops in: query description: not supported schema: type: boolean default: false - name: remarks in: query description: Parse & return hints & warnings? schema: type: boolean default: true - name: language in: query description: Language of the results. schema: type: string default: en - name: products in: query description: Filter by profile-specific products (e.g. regional transport only). schema: $ref: '#/components/schemas/ProfileSpecificProducts' - name: pretty in: query description: Pretty-print JSON responses? schema: type: boolean responses: 2XX: description: An object with an array of departures, in the [`hafas-client` format](https://github.com/public-transport/hafas-client/blob/6/docs/departures.md). content: application/json: schema: type: object properties: departures: type: array items: $ref: '#/components/schemas/Alternative' realtimeDataUpdatedAt: type: integer required: - departures /stops/{id}/arrivals: get: summary: Fetches arrivals at a stop/station. description: Works like `/stops/{id}/departures`, except that it uses [`hafasClient.arrivals()`](https://github.com/public-transport/hafas-client/blob/6/docs/arrivals.md) to **query arrivals at a stop/station**. externalDocs: description: '`hafasClient.arrivals()` documentation' url: https://github.com/public-transport/hafas-client/blob/6/docs/arrivals.md parameters: - name: id in: path description: stop/station ID to show arrivals for required: true schema: type: string - name: when in: query description: 'Date & time to get departures for. – Default: *now*' schema: type: string format: date-time - name: direction in: query description: not supported schema: type: string - name: duration in: query description: Show departures for how many minutes? schema: type: integer default: 10 - name: results in: query description: 'Max. number of departures. – Default: *whatever HAFAS wants*' schema: type: integer - name: linesOfStops in: query description: not supported schema: type: boolean default: false - name: remarks in: query description: Parse & return hints & warnings? schema: type: boolean default: true - name: language in: query description: Language of the results. schema: type: string default: en - name: products in: query description: Filter by profile-specific products (e.g. regional transport only). schema: $ref: '#/components/schemas/ProfileSpecificProducts' - name: pretty in: query description: Pretty-print JSON responses? schema: type: boolean responses: 2XX: description: An object with an array of arrivals, in the [`hafas-client` format](https://github.com/public-transport/hafas-client/blob/6/docs/arrivals.md). content: application/json: schema: type: object properties: arrivals: type: array items: $ref: '#/components/schemas/Alternative' realtimeDataUpdatedAt: type: integer required: - arrivals /journeys: get: summary: Finds journeys from A to B. description: Uses [`hafasClient.journeys()`](https://github.com/public-transport/hafas-client/blob/6/docs/journeys.md) to **find journeys from A (`from`) to B (`to`)**. externalDocs: description: '`hafasClient.journeys()` documentation' url: https://github.com/public-transport/hafas-client/blob/6/docs/journeys.md parameters: - name: from in: query schema: type: string description: '"from" as stop/station ID (e.g. from=8010159 for Halle (Saale) Hbf)' - name: from.id in: query schema: type: string description: '"from" as POI (e.g. from.id=991561765&from.latitude=51.48364&from.longitude=11.98084 for Halle+(Saale),+Stadtpark+Halle+(Grünanlagen))' - name: from.address in: query schema: type: string description: '"from" as an address (e.g. from.latitude=51.25639&from.longitude=7.46685&from.address=Hansestadt+Breckerfeld,+Hansering+3 for Hansestadt Breckerfeld, Hansering 3)' - name: from.latitude in: query schema: type: number - name: from.longitude in: query schema: type: number - name: to in: query schema: type: string description: '"to" as stop/station ID' - name: to.id in: query schema: type: string description: '"to" as POI' - name: to.address in: query schema: type: string description: '"to" as an address' - name: to.latitude in: query schema: type: number - name: to.longitude in: query schema: type: number - name: departure in: query description: 'Compute journeys departing at this date/time. Mutually exclusive with `arrival`. – Default: *now*' schema: type: string format: date-time - name: arrival in: query description: 'Compute journeys arriving at this date/time. Mutually exclusive with `departure`. – Default: *now*' schema: type: string format: date-time - name: earlierThan in: query description: Compute journeys "before" an `earlierRef`. schema: type: string - name: laterThan in: query description: Compute journeys "after" an `laterRef`. schema: type: string - name: results in: query description: Max. number of journeys. schema: type: integer default: 3 - name: stopovers in: query description: Fetch & parse stopovers on the way? schema: type: boolean default: false - name: transfers in: query description: 'Maximum number of transfers. – Default: *let HAFAS decide*' schema: type: integer - name: transferTime in: query description: Minimum time in minutes for a single transfer. schema: type: integer default: 0 - name: accessibility in: query description: not supported schema: type: string - name: bike in: query description: Compute only bike-friendly journeys? schema: type: boolean default: false - name: startWithWalking in: query description: not supported schema: type: boolean default: true - name: walkingSpeed in: query description: not supported schema: type: string default: normal enum: - slow - normal - fast - name: tickets in: query description: Return information about available tickets? only supported for /journeys/{ref} schema: type: boolean default: false - name: polylines in: query description: Fetch & parse a shape for each journey leg? only supported for /journeys/{ref} schema: type: boolean default: false - name: subStops in: query description: not supported schema: type: boolean default: true - name: entrances in: query description: not supported schema: type: boolean default: true - name: remarks in: query description: Parse & return hints & warnings? schema: type: boolean default: true - name: scheduledDays in: query description: Parse & return dates the journey is valid on?, returns a field `serviceDays` (instead of `scheduledDays` in hafas-client!) with a different, human-readable structure schema: type: boolean default: false - name: notOnlyFastRoutes in: query description: if true, also show journeys that are mathematically non-optimal schema: type: boolean default: false - name: bestprice in: query description: search for lowest prices across the entire day schema: type: boolean default: false - name: language in: query description: Language of the results. schema: type: string default: en - name: loyaltyCard in: query description: 'Type of loyalty card in use. – Default: *none*' schema: type: string enum: - bahncard-1st-25 - bahncard-2nd-25 - bahncard-1st-50 - bahncard-2nd-50 - bahncard-1st-100 - bahncard-2nd-100 - vorteilscard - halbtaxabo - generalabonnement-1st - generalabonnement-2nd - nl-40 - at-klimaticket - name: firstClass in: query description: Search for first-class options? schema: type: boolean default: 'false' - name: age in: query description: 'Age of traveller – Default: *adult*' schema: type: integer - name: products in: query description: Filter by profile-specific products (e.g. regional transport only). schema: $ref: '#/components/schemas/ProfileSpecificProducts' - name: pretty in: query description: Pretty-print JSON responses? schema: type: boolean responses: 2XX: description: An object with an array of journeys, in the [`hafas-client` format](https://github.com/public-transport/hafas-client/blob/6/docs/journeys.md). content: application/json: schema: type: object properties: journeys: type: array items: $ref: '#/components/schemas/Journey' realtimeDataUpdatedAt: type: integer earlierRef: type: string laterRef: type: string required: - journeys /trips/{id}: get: summary: Fetches a trip by ID. description: Uses [`hafasClient.trip()`](https://github.com/public-transport/hafas-client/blob/6/docs/trip.md) to **fetch a trip by ID**. externalDocs: description: '`hafasClient.trip()` documentation' url: https://github.com/public-transport/hafas-client/blob/6/docs/trip.md parameters: - name: id in: path description: trip ID required: true schema: type: string - name: stopovers in: query description: Fetch & parse stopovers on the way? schema: type: boolean default: true - name: remarks in: query description: Parse & return hints & warnings? schema: type: boolean default: true - name: polyline in: query description: Fetch & parse the geographic shape of the trip? (does not work for RIS trip ids from boards of db profile) schema: type: boolean default: false - name: language in: query description: Language of the results. schema: type: string default: en - name: pretty in: query description: Pretty-print JSON responses? schema: type: boolean responses: 2XX: description: An object with the trip, in the [`hafas-client` format](https://github.com/public-transport/hafas-client/blob/6/docs/trip.md). content: application/json: schema: type: object properties: trip: $ref: '#/components/schemas/Trip' realtimeDataUpdatedAt: type: integer required: - trip /locations/nearby: get: summary: Finds stops/stations & POIs close to a geolocation. description: Uses [`hafasClient.nearby()`](https://github.com/public-transport/hafas-client/blob/6/docs/nearby.md) to **find stops/stations & POIs close to the given geolocation**. externalDocs: description: '`hafasClient.nearby()` documentation' url: https://github.com/public-transport/hafas-client/blob/6/docs/nearby.md parameters: - name: location in: query schema: $ref: '#/components/schemas/Location' - name: results in: query description: maximum number of results schema: type: integer default: 8 - name: distance in: query description: 'maximum walking distance in meters – Default: –' schema: type: integer - name: stops in: query description: Return stops/stations? schema: type: boolean default: true - name: poi in: query description: Return points of interest? schema: type: boolean default: false - name: linesOfStops in: query description: not supported schema: type: boolean default: false - name: language in: query description: Language of the results. schema: type: string default: en - name: pretty in: query description: Pretty-print JSON responses? schema: type: boolean responses: 2XX: description: An array of locations, in the [`hafas-client` format](https://github.com/public-transport/hafas-client/blob/6/docs/nearby.md). content: application/json: schema: type: array items: anyOf: - $ref: '#/components/schemas/Location' - $ref: '#/components/schemas/Station' - $ref: '#/components/schemas/Stop' /locations: get: summary: Finds stops/stations, POIs and addresses matching a query. description: Uses [`hafasClient.locations()`](https://github.com/public-transport/hafas-client/blob/6/docs/locations.md) to **find stops/stations, POIs and addresses matching `query`**. externalDocs: description: '`hafasClient.locations()` documentation' url: https://github.com/public-transport/hafas-client/blob/6/docs/locations.md parameters: - name: query in: query description: The term to search for. required: true schema: type: string - name: fuzzy in: query description: Find more than exact matches? schema: type: boolean default: true - name: results in: query description: How many stations shall be shown? schema: type: integer default: 10 - name: stops in: query description: Show stops/stations? schema: type: boolean default: true - name: addresses in: query description: Show addresses? schema: type: boolean default: true - name: poi in: query description: Show points of interest? schema: type: boolean default: true - name: linesOfStops in: query description: not supported schema: type: boolean default: false - name: language in: query description: Language of the results. schema: type: string default: en - name: pretty in: query description: Pretty-print JSON responses? schema: type: boolean responses: 2XX: description: An array of locations, in the [`hafas-client` format](https://github.com/public-transport/hafas-client/blob/6/docs/locations.md). content: application/json: schema: type: array items: anyOf: - $ref: '#/components/schemas/Location' - $ref: '#/components/schemas/Station' - $ref: '#/components/schemas/Stop' /journeys/{ref}: get: summary: Fetches up-to-date realtime data for a journey computed before. description: |- Uses [`hafasClient.refreshJourney()`](https://github.com/public-transport/hafas-client/blob/6/docs/refresh-journey.md) to **"refresh" a journey, using its `refreshToken`**. The journey will be the same (equal `from`, `to`, `via`, date/time & vehicles used), but you can get up-to-date realtime data, like delays & cancellations. externalDocs: description: '`hafasClient.refreshJourney()` documentation' url: https://github.com/public-transport/hafas-client/blob/6/docs/refresh-journey.md parameters: - name: ref in: path description: The journey's `refreshToken`. required: true schema: type: string - name: stopovers in: query description: Fetch & parse stopovers on the way? schema: type: boolean default: false - name: tickets in: query description: Return information about available tickets? mutually exclusive with polylines schema: type: boolean default: false - name: polylines in: query description: Fetch & parse a shape for each journey leg? mutually exclusive with tickets schema: type: boolean default: false - name: subStops in: query description: not supported schema: type: boolean default: true - name: entrances in: query description: not supported schema: type: boolean default: true - name: remarks in: query description: Parse & return hints & warnings? schema: type: boolean default: true - name: scheduledDays in: query description: Parse & return dates the journey is valid on?, returns a field `serviceDays` (instead of `scheduledDays` in hafas-client!) with a different, human-readable structure schema: type: boolean default: false - name: notOnlyFastRoutes in: query description: if true, also show journeys that are mathematically non-optimal schema: type: boolean default: false - name: bestprice in: query description: search for lowest prices across the entire day schema: type: boolean default: false - name: language in: query description: Language of the results. schema: type: string default: en - name: pretty in: query description: Pretty-print JSON responses? schema: type: boolean responses: 2XX: description: An object with the up-to-date journey, in the [`hafas-client` format](https://github.com/public-transport/hafas-client/blob/6/docs/refresh-journey.md). content: application/json: schema: type: object properties: journey: $ref: '#/components/schemas/Journey' realtimeDataUpdatedAt: type: integer required: - journey components: schemas: ProductType: description: |- A ProductType relates to how a means of transport "works" in local context. Example: Even though S-Bahn and U-Bahn in Berlin are both trains, they have different operators, service patterns, stations and look different. Therefore, they are two distinct products subway and suburban. type: object properties: id: type: string mode: enum: - aircraft - bicycle - bus - car - gondola - taxi - train - walking - watercraft type: string name: type: string short: type: string bitmasks: type: array items: type: number default: type: boolean Profile: description: |- A profile is a specific customisation for each endpoint. It parses data from the API differently, add additional information, or enable non-default methods. type: object properties: locale: type: string timezone: type: string endpoint: type: string products: type: array items: $ref: '#/components/schemas/ProductType' trip: type: boolean radar: type: boolean refreshJourney: type: boolean journeysFromTrip: type: boolean reachableFrom: type: boolean journeysWalkingSpeed: type: boolean tripsByName: type: boolean remarks: type: boolean remarksGetPolyline: type: boolean lines: type: boolean Location: description: A location object is used by other items to indicate their locations. type: object properties: type: type: string enum: - location id: type: string name: type: string poi: type: boolean address: type: string longitude: type: number latitude: type: number altitude: type: number distance: type: number Products: description: Each public transportation network exposes its products as boolean properties. See {@link ProductType} type: object additionalProperties: type: boolean Facilities: type: object additionalProperties: type: string ReisezentrumOpeningHours: type: object properties: Mo: type: string Di: type: string Mi: type: string Do: type: string Fr: type: string Sa: type: string So: type: string Station: description: |- A station is a larger building or area that can be identified by a name. It is usually represented by a single node on a public transport map. Whereas a stop usually specifies a location, a station often is a broader area that may span across multiple levels or buildings. type: object properties: type: type: string enum: - station id: type: string name: type: string station: $ref: '#/components/schemas/Station' location: $ref: '#/components/schemas/Location' products: $ref: '#/components/schemas/Products' lines: type: array items: $ref: '#/components/schemas/Line' isMeta: type: boolean regions: description: region ids type: array items: type: string facilities: $ref: '#/components/schemas/Facilities' reisezentrumOpeningHours: $ref: '#/components/schemas/ReisezentrumOpeningHours' stops: type: array items: anyOf: - $ref: '#/components/schemas/Location' - $ref: '#/components/schemas/Station' - $ref: '#/components/schemas/Stop' entrances: type: array items: $ref: '#/components/schemas/Location' transitAuthority: type: string distance: type: number Ids: description: Ids of a Stop, i.e. dhid as 'DELFI Haltestellen ID' type: object additionalProperties: type: string Stop: description: |- A stop is a single small point or structure at which vehicles stop. A stop always belongs to a station. It may for example be a sign, a basic shelter or a railway platform. type: object properties: type: type: string enum: - stop id: type: string name: type: string location: $ref: '#/components/schemas/Location' station: $ref: '#/components/schemas/Station' products: $ref: '#/components/schemas/Products' lines: type: array items: $ref: '#/components/schemas/Line' isMeta: type: boolean reisezentrumOpeningHours: $ref: '#/components/schemas/ReisezentrumOpeningHours' ids: $ref: '#/components/schemas/Ids' loadFactor: type: string entrances: type: array items: $ref: '#/components/schemas/Location' transitAuthority: type: string distance: type: number Region: description: A region is a group of stations, for example a metropolitan area or a geographical or cultural region. type: object properties: type: type: string enum: - region id: type: string name: type: string stations: description: station ids type: array items: type: string Line: type: object properties: type: type: string enum: - line id: type: string name: type: string adminCode: type: string fahrtNr: type: string additionalName: type: string product: type: string public: type: boolean mode: enum: - aircraft - bicycle - bus - car - gondola - taxi - train - walking - watercraft type: string routes: description: routes ids type: array items: type: string operator: $ref: '#/components/schemas/Operator' express: type: boolean metro: type: boolean night: type: boolean nr: type: number symbol: type: string directions: type: array items: type: string productName: type: string RealtimeDataUpdatedAt: type: object properties: realtimeDataUpdatedAt: type: number Route: description: A route represents a single set of stations, of a single line. type: object properties: type: type: string enum: - route id: type: string line: type: string mode: enum: - aircraft - bicycle - bus - car - gondola - taxi - train - walking - watercraft type: string stops: description: stop ids type: array items: type: string Cycle: type: object properties: min: type: number max: type: number nr: type: number ArrivalDeparture: type: object properties: arrival: type: number departure: type: number Schedule: description: |- There are many ways to format schedules of public transport routes. This one tries to balance the amount of data and consumability. It is specifically geared towards urban public transport, with frequent trains and homogenous travels. type: object properties: type: type: string enum: - schedule id: type: string route: type: string mode: enum: - aircraft - bicycle - bus - car - gondola - taxi - train - walking - watercraft type: string sequence: type: array items: $ref: '#/components/schemas/ArrivalDeparture' starts: description: array of Unix timestamps type: array items: type: string Operator: type: object properties: type: type: string enum: - operator id: type: string name: type: string Hint: type: object properties: type: enum: - foreign-id - hint - local-fare-zone - status - stop-dhid - stop-website - transit-authority type: string code: type: string summary: type: string text: type: string tripId: type: string Status: type: object properties: type: enum: - foreign-id - hint - local-fare-zone - status - stop-dhid - stop-website - transit-authority type: string code: type: string summary: type: string text: type: string tripId: type: string IcoCrd: type: object properties: x: type: number 'y': type: number type: type: string Edge: type: object properties: fromLocation: anyOf: - $ref: '#/components/schemas/Location' - $ref: '#/components/schemas/Station' - $ref: '#/components/schemas/Stop' toLocation: anyOf: - $ref: '#/components/schemas/Location' - $ref: '#/components/schemas/Station' - $ref: '#/components/schemas/Stop' icon: type: object properties: {} additionalProperties: true dir: type: number icoCrd: $ref: '#/components/schemas/IcoCrd' Event: type: object properties: fromLocation: anyOf: - $ref: '#/components/schemas/Location' - $ref: '#/components/schemas/Station' - $ref: '#/components/schemas/Stop' toLocation: anyOf: - $ref: '#/components/schemas/Location' - $ref: '#/components/schemas/Station' - $ref: '#/components/schemas/Stop' start: type: string end: type: string sections: type: array items: type: string Warning: type: object properties: type: enum: - status - warning type: string id: type: string icon: type: object properties: {} additionalProperties: true summary: type: string text: type: string category: type: string priority: type: number products: $ref: '#/components/schemas/Products' edges: type: array items: $ref: '#/components/schemas/Edge' events: type: array items: $ref: '#/components/schemas/Event' validFrom: type: string validUntil: type: string modified: type: string company: type: string categories: type: array items: type: number affectedLines: type: array items: $ref: '#/components/schemas/Line' fromStops: type: array items: anyOf: - $ref: '#/components/schemas/Location' - $ref: '#/components/schemas/Station' - $ref: '#/components/schemas/Stop' toStops: type: array items: anyOf: - $ref: '#/components/schemas/Location' - $ref: '#/components/schemas/Station' - $ref: '#/components/schemas/Stop' Geometry: type: object properties: type: type: string enum: - Point coordinates: type: array items: type: number Feature: type: object properties: type: type: string enum: - Feature properties: anyOf: - type: object properties: {} additionalProperties: true - $ref: '#/components/schemas/Location' - $ref: '#/components/schemas/Station' - $ref: '#/components/schemas/Stop' geometry: $ref: '#/components/schemas/Geometry' FeatureCollection: type: object properties: type: type: string enum: - FeatureCollection features: type: array items: $ref: '#/components/schemas/Feature' PrognosisType: enum: - calculated - prognosed type: string StopOver: description: A stopover represents a vehicle stopping at a stop/station at a specific time. type: object properties: stop: anyOf: - $ref: '#/components/schemas/Station' - $ref: '#/components/schemas/Stop' departure: description: null, if last stopOver of trip type: string departureDelay: type: number prognosedDeparture: type: string plannedDeparture: type: string departurePlatform: type: string prognosedDeparturePlatform: type: string plannedDeparturePlatform: type: string arrival: description: null, if first stopOver of trip type: string arrivalDelay: type: number prognosedArrival: type: string plannedArrival: type: string arrivalPlatform: type: string prognosedArrivalPlatform: type: string plannedArrivalPlatform: type: string remarks: type: array items: anyOf: - $ref: '#/components/schemas/Hint' - $ref: '#/components/schemas/Status' - $ref: '#/components/schemas/Warning' passBy: type: boolean cancelled: type: boolean departurePrognosisType: $ref: '#/components/schemas/PrognosisType' arrivalPrognosisType: $ref: '#/components/schemas/PrognosisType' additional: type: boolean Trip: description: Trip – a vehicle stopping at a set of stops at specific times type: object properties: id: type: string origin: anyOf: - $ref: '#/components/schemas/Location' - $ref: '#/components/schemas/Station' - $ref: '#/components/schemas/Stop' destination: anyOf: - $ref: '#/components/schemas/Location' - $ref: '#/components/schemas/Station' - $ref: '#/components/schemas/Stop' departure: type: string plannedDeparture: type: string prognosedArrival: type: string departureDelay: type: number departurePlatform: type: string prognosedDeparturePlatform: type: string plannedDeparturePlatform: type: string arrival: type: string plannedArrival: type: string prognosedDeparture: type: string arrivalDelay: type: number arrivalPlatform: type: string prognosedArrivalPlatform: type: string plannedArrivalPlatform: type: string stopovers: type: array items: $ref: '#/components/schemas/StopOver' schedule: type: number price: $ref: '#/components/schemas/Price' operator: type: number direction: type: string line: $ref: '#/components/schemas/Line' cancelled: type: boolean walking: type: boolean loadFactor: type: string distance: type: number public: type: boolean transfer: type: boolean cycle: $ref: '#/components/schemas/Cycle' alternatives: type: array items: $ref: '#/components/schemas/Alternative' polyline: $ref: '#/components/schemas/FeatureCollection' remarks: type: array items: anyOf: - $ref: '#/components/schemas/Hint' - $ref: '#/components/schemas/Status' - $ref: '#/components/schemas/Warning' currentLocation: $ref: '#/components/schemas/Location' departurePrognosisType: $ref: '#/components/schemas/PrognosisType' arrivalPrognosisType: $ref: '#/components/schemas/PrognosisType' checkin: type: boolean scheduledDays: $ref: '#/components/schemas/ScheduledDays' TripWithRealtimeData: type: object properties: trip: $ref: '#/components/schemas/Trip' realtimeDataUpdatedAt: type: number TripsWithRealtimeData: type: object properties: trips: type: array items: $ref: '#/components/schemas/Trip' realtimeDataUpdatedAt: type: number WarningsWithRealtimeData: type: object properties: remarks: type: array items: $ref: '#/components/schemas/Warning' realtimeDataUpdatedAt: type: number LinesWithRealtimeData: type: object properties: lines: type: array items: $ref: '#/components/schemas/Line' realtimeDataUpdatedAt: type: number Price: type: object properties: amount: type: number currency: type: string hint: type: string Alternative: type: object properties: tripId: type: string direction: type: string location: $ref: '#/components/schemas/Location' line: $ref: '#/components/schemas/Line' stop: anyOf: - $ref: '#/components/schemas/Station' - $ref: '#/components/schemas/Stop' when: type: string plannedWhen: type: string prognosedWhen: type: string delay: type: number platform: type: string plannedPlatform: type: string prognosedPlatform: type: string remarks: type: array items: anyOf: - $ref: '#/components/schemas/Hint' - $ref: '#/components/schemas/Status' - $ref: '#/components/schemas/Warning' cancelled: type: boolean loadFactor: type: string provenance: type: string previousStopovers: type: array items: $ref: '#/components/schemas/StopOver' nextStopovers: type: array items: $ref: '#/components/schemas/StopOver' frames: type: array items: $ref: '#/components/schemas/Frame' polyline: $ref: '#/components/schemas/FeatureCollection' currentTripPosition: $ref: '#/components/schemas/Location' origin: anyOf: - $ref: '#/components/schemas/Location' - $ref: '#/components/schemas/Station' - $ref: '#/components/schemas/Stop' destination: anyOf: - $ref: '#/components/schemas/Location' - $ref: '#/components/schemas/Station' - $ref: '#/components/schemas/Stop' prognosisType: $ref: '#/components/schemas/PrognosisType' Departures: type: object properties: departures: type: array items: $ref: '#/components/schemas/Alternative' realtimeDataUpdatedAt: type: number Arrivals: type: object properties: arrivals: type: array items: $ref: '#/components/schemas/Alternative' realtimeDataUpdatedAt: type: number Leg: description: Leg of journey type: object properties: tripId: type: string origin: anyOf: - $ref: '#/components/schemas/Location' - $ref: '#/components/schemas/Station' - $ref: '#/components/schemas/Stop' destination: anyOf: - $ref: '#/components/schemas/Location' - $ref: '#/components/schemas/Station' - $ref: '#/components/schemas/Stop' departure: type: string plannedDeparture: type: string prognosedArrival: type: string departureDelay: type: number departurePlatform: type: string prognosedDeparturePlatform: type: string plannedDeparturePlatform: type: string arrival: type: string plannedArrival: type: string prognosedDeparture: type: string arrivalDelay: type: number arrivalPlatform: type: string prognosedArrivalPlatform: type: string plannedArrivalPlatform: type: string stopovers: type: array items: $ref: '#/components/schemas/StopOver' schedule: type: number price: $ref: '#/components/schemas/Price' operator: type: number direction: type: string line: $ref: '#/components/schemas/Line' reachable: type: boolean cancelled: type: boolean walking: type: boolean loadFactor: type: string distance: type: number public: type: boolean transfer: type: boolean cycle: $ref: '#/components/schemas/Cycle' alternatives: type: array items: $ref: '#/components/schemas/Alternative' polyline: $ref: '#/components/schemas/FeatureCollection' remarks: type: array items: anyOf: - $ref: '#/components/schemas/Hint' - $ref: '#/components/schemas/Status' - $ref: '#/components/schemas/Warning' currentLocation: $ref: '#/components/schemas/Location' departurePrognosisType: $ref: '#/components/schemas/PrognosisType' arrivalPrognosisType: $ref: '#/components/schemas/PrognosisType' checkin: type: boolean ScheduledDays: type: object additionalProperties: type: boolean Journey: description: |- A journey is a computed set of directions to get from A to B at a specific time. It would typically be the result of a route planning algorithm. type: object properties: type: type: string