public-transport / transport-apis

machine-readable list of transport API endpoints
Creative Commons Zero v1.0 Universal
61 stars 6 forks source link

otpGraphQL: remove supportedTransitModes field #65

Open 1Maxnet1 opened 1 year ago

1Maxnet1 commented 1 year ago

I found that in https://github.com/public-transport/transport-apis/blob/236d88d00f3bbdfaf8b623a8556b9fae6a22cf61/data/de/ulm-otp.json#L19 and https://github.com/public-transport/transport-apis/blob/236d88d00f3bbdfaf8b623a8556b9fae6a22cf61/data/de/stadtnavi-otp.json#L19 an option called "supportedTransitModes" is used. However it is not mentioned in the protocol specific options: https://github.com/public-transport/transport-apis#open-trip-planner-with-graphql

So imho it would make sense to add it there and maybe link to the possible values (e.g. this https://docs.opentripplanner.org/en/dev-2.x/RoutingModes/ if I'm not mistaken).

If you agree I could make a little PR adding the documentation

1Maxnet1 commented 1 year ago

Actually I would say, that the supportedTransitModes can be retrieved from the api (named travelOptions see e.g. https://api.stadtnavi.de/routing/v1/router/ and http://dev.opentripplanner.org/apidoc/1.0.0/json_TravelOption.html) so we do not need to have them in the configuration file at all. As removing them would be a breaking change, I would suggest to document the option anyway and mention that they can be retrieved from the api, so the option shouldn't be used, so that it can be removed in a new major release of this repo?

However I would appreciate some thoughts on that :)

derhuerst commented 1 year ago

I agree that it can be removed as a breaking change.