Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

OpenAPI Fixes + Improvements #291

Merged
merged 8 commits into from
Feb 1, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/unix.yml
Original file line number Diff line number Diff line change
@@ -203,13 +203,14 @@ jobs:
mkdir motis/web
mv ui/web/{external_lib,img,js,style} motis/web/
mv ui/web/{*.html,*.js,*.ico} motis/web/
mv ui/web/openapi motis/web/
mv ui/rsl/dist motis/web/rsl
mv build/motis motis/
cp -r deps/osrm-backend/profiles motis/osrm-profiles
cp -r deps/ppr/profiles motis/ppr-profiles
cp -r deps/tiles/profile motis/tiles-profiles
cp docs/generated/openapi-3.1/openapi.yaml motis/web/openapi.yaml
cp docs/generated/openapi-3.0/openapi.yaml motis/web/openapi-3.0.yaml
cp docs/generated/openapi-3.1/openapi.yaml motis/web/openapi/openapi.yaml
cp docs/generated/openapi-3.0/openapi.yaml motis/web/openapi/openapi-3.0.yaml
tar cjf motis-${{ matrix.config.preset }}.tar.bz2 motis

- name: Upload Distribution
5 changes: 3 additions & 2 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
@@ -148,13 +148,14 @@ jobs:
mkdir web
Copy-Item .\ui\web\external_lib,.\ui\web\img,.\ui\web\js,.\ui\web\style .\web\ -Recurse
Copy-Item .\ui\web\*.html,.\ui\web\*.js,.\ui\web\*.ico .\web\
Copy-Item .\ui\web\openapi .\web\ -Recurse
Copy-Item .\ui\rsl\dist .\web\rsl -Recurse

- name: Move API Docs
if: matrix.config.mode == 'Release'
run: |
Copy-Item .\docs\generated\openapi-3.1\openapi.yaml .\web\openapi.yaml
Copy-Item .\docs\generated\openapi-3.0\openapi.yaml .\web\openapi-3.0.yaml
Copy-Item .\docs\generated\openapi-3.1\openapi.yaml .\web\openapi\openapi.yaml
Copy-Item .\docs\generated\openapi-3.0\openapi.yaml .\web\openapi\openapi-3.0.yaml

- name: Create Distribution
if: matrix.config.mode == 'Release'
32 changes: 16 additions & 16 deletions docs/api/paths.yaml
Original file line number Diff line number Diff line change
@@ -45,7 +45,7 @@
#/lookup/meta_station_batch:

/lookup/ribasis:
summary: Returns a trip in RI Basis format
summary: Retrieve a trip in RI Basis format
description: |
Returns the current state of a trip in RI Basis format. Also included
in the response are all associated trips (merged and through services).
@@ -63,7 +63,7 @@
description: Information about the requested trip and associated trips

/lookup/schedule_info:
summary: Returns information about the currently loaded schedule
summary: Currently loaded schedule
tags:
- lookup
output:
@@ -81,7 +81,7 @@
#/parking/edges:

/parking/geo:
summary: Request parking lots in an area
summary: Parking lots in an area
tags:
- parking
input: motis.parking.ParkingGeoRequest
@@ -91,7 +91,7 @@


/parking/lookup:
summary: Request information about a parking lot by ID
summary: Lookup a parking lot by ID
tags:
- parking
input: motis.parking.ParkingLookupRequest
@@ -136,7 +136,7 @@
description: Universe was destroyed (or marked for destruction if still in use).

/paxmon/filter/groups:
summary: Request a list of passenger groups with filter and sort options
summary: List passenger groups with filter and sort options
tags:
- rsl
input: motis.paxmon.PaxMonFilterGroupsRequest
@@ -145,7 +145,7 @@
description: A list of passenger groups matching the request

/paxmon/filter_trips:
summary: Request a list of trips with filter and sort options
summary: List trips with filter and sort options
description: |
Returns a list of trips tracked by paxmon (i.e. at least one passenger
group uses or used the trip). This API offers various filter and sort
@@ -206,7 +206,7 @@
description: Information about the newly created paxmon universe

/paxmon/get_groups:
summary: Get information about passenger groups
summary: Information about passenger groups
tags:
- rsl
input: motis.paxmon.PaxMonGetGroupsRequest
@@ -215,7 +215,7 @@
description: Information about the requested passenger groups

/paxmon/get_interchanges:
summary: Get a list of monitored interchanges at a station
summary: List monitored interchanges at a station
tags:
- rsl
input: motis.paxmon.PaxMonGetInterchangesRequest
@@ -224,7 +224,7 @@
description: Information about the requested interchanges

/paxmon/group_statistics:
summary: Get various passenger group statistics
summary: Passenger group statistics
tags:
- rsl
input: motis.paxmon.PaxMonGroupStatisticsRequest
@@ -233,7 +233,7 @@
description: Statistics for the requested universe

/paxmon/groups_in_trip:
summary: Get a list of passenger groups in a trip
summary: List passenger groups in a trip
tags:
- rsl
input: motis.paxmon.PaxMonGetGroupsInTripRequest
@@ -280,7 +280,7 @@
description: Information about the changes

/paxmon/status:
summary: Request basic information about a paxmon universe
summary: Information about a paxmon universe
tags:
- rsl
input: motis.paxmon.PaxMonStatusRequest
@@ -289,7 +289,7 @@
description: Information about the requested paxmon universe

/paxmon/trip_load_info:
summary: Get load information for a trip
summary: Load information for a trip
tags:
- rsl
input: motis.paxmon.PaxMonGetTripLoadInfosRequest
@@ -298,7 +298,7 @@
description: Load information for the requested trip

/paxmon/universes:
summary: Request a list of paxmon universes
summary: List paxmon universes
description: >
Returns a list of all universes that currently exist on the server,
as well as the current multiverse ID.
@@ -309,7 +309,7 @@
description: A list of paxmon universes

/ppr/profiles:
summary: Get list of available pedestrian routing profiles
summary: List available pedestrian routing profiles
tags:
- ppr
output:
@@ -326,7 +326,7 @@
description: Pedestrian routes

/railviz/get_station:
summary: Request a list of trips arriving and departing at a station
summary: List trips arriving and departing at a station
tags:
- lookup
input: motis.railviz.RailVizStationRequest
@@ -362,7 +362,7 @@
description: Routing response

/trip_to_connection:
summary: Get information about the stops of a trip
summary: Retrieve the stops of a trip
tags:
- lookup
input: motis.TripId
16 changes: 10 additions & 6 deletions docs/api/schemas/motis.yaml
Original file line number Diff line number Diff line change
@@ -29,17 +29,17 @@ TripId:
description: TODO
fields:
station_id:
description: TODO
description: The station ID of the first scheduled departure.
train_nr:
description: TODO
description: The unique train number at the first scheduled departure.
time:
description: TODO
description: The scheduled first departure time (unix timestamp).
target_station_id:
description: TODO
description: The scheduled final destination of the trip.
target_time:
description: TODO
description: The scheduled arrival time at the destination (unix timestamp).
line_id:
description: TODO
description: The line name.
TimestampReason:
description: TODO
ConnectionStatus:
@@ -281,6 +281,10 @@ MotisError:
description: TODO
reason:
description: TODO
examples:
- error_code: 3
category: motis::module
reason: "module: target not found"
MotisSuccess:
description: TODO
fields: {}
4 changes: 4 additions & 0 deletions docs/api/schemas/motis/guesser.yaml
Original file line number Diff line number Diff line change
@@ -3,8 +3,12 @@ StationGuesserRequest:
fields:
guess_count:
description: TODO
examples:
- 10
input:
description: TODO
examples:
- Frankfurt
StationGuesserResponse:
description: TODO
fields:
15 changes: 10 additions & 5 deletions docs/api/schemas/motis/lookup.yaml
Original file line number Diff line number Diff line change
@@ -65,21 +65,26 @@ LookupRiBasisRequest:
description: TODO
fields:
trip_id:
description: TODO
description: Trip ID of the trip to retrieve.
schedule:
description: TODO
description: |
The ID of the schedule to use.

Use `0` for the default schedule.
RiBasisTrip:
description: TODO
fields:
trip_id:
description: TODO
description: The trip ID.
fahrt:
description: TODO
description: The full trip in RiBasisFahrt format.
LookupRiBasisResponse:
description: TODO
fields:
trips:
description: TODO
description: >
The requested trip and all associated trips (merged and through
services).
LookupScheduleInfoResponse:
description: Information about the loaded schedule
fields:
Loading