Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
stop_headsign not available in Index API #2224
Trips may change headsign underway, and this is handled by the field stop_headsign, which seems to be handled well both in the model as well as in the Plan API. However, it seems as the field is left out of the Index API (it's missing in TripTimeShort). This seems to have been addressed in in #438 and #1301, with no indications of this having been solved.
We have run into a problem with this now. Because of new metro line patterns, some routes will change destination underway - and this needs to be reflected in the passenger information services, including departure times from stops.
Is there any known workaround?
For those interested in the Oslo Metro network, please see:
Is this resolved now? I see that the transit index API returns TripTimeShort objects to represent the stoptimes within a trip. Each TripTimeShort (one for each stop on the trip) has a headsign field. This headsign field is set using the getHeadsign method on the trip times, which checks for a per-stop headsign and falls back to the headsign for the entire trip if there is no array of per-stop headsigns.
We are still using OTP 0.19 (where this doesn't work) and a workaround in production, but I have now checked the Index API in our test system vith OTP 1.0.0, and there, all headsign attributes are present and have the correct content. I have not checked GraphQL, so @hannesj should comment as well.