Summary
routes-for-location returns service alerts in data.references.situations. The spec gives this endpoint exactly one populated reference array, agencies.
Current behaviour
routesForLocationHandler collects alerts for every returned route and writes them into references.situations (internal/restapi/routes_for_location_handler.go:82-84).
This came from a change that swept every non-trip handler at once, not from a decision about this endpoint.
Verified against the deployed OneBusAway server on identical live data. Alert 1_92239 selects route 1_100016 with no stop or trip restriction — the only alert shape that reaches maglev's by-route index. At a stop on that route, both servers return routes 1_100016 and 1_100017:
|
situations |
| Deployed OBA |
[] |
| maglev |
['1_92239'] |
Spec requirement
routes-for-location, Response Structure:
data.references — Object containing referenced entities. For this endpoint only agencies is populated; all other arrays (routes, stops, trips, stopTimes, situations) are present but empty.
Route objects carry no situation IDs, so a caller has nothing to resolve a situation against.
Acceptance criteria
Scope note
Only route-only alerts ever reached this path — alerts naming both a route and a stop never enter the by-route index (internal/gtfs/realtime.go:682), so output is unchanged for them. The other five BuildSituationReferences callers listed in #1377 are out of scope here.
Summary
routes-for-locationreturns service alerts indata.references.situations. The spec gives this endpoint exactly one populated reference array,agencies.Current behaviour
routesForLocationHandlercollects alerts for every returned route and writes them intoreferences.situations(internal/restapi/routes_for_location_handler.go:82-84).This came from a change that swept every non-trip handler at once, not from a decision about this endpoint.
Verified against the deployed OneBusAway server on identical live data. Alert
1_92239selects route1_100016with no stop or trip restriction — the only alert shape that reaches maglev's by-route index. At a stop on that route, both servers return routes1_100016and1_100017:[]['1_92239']Spec requirement
routes-for-location, Response Structure:
Route objects carry no situation IDs, so a caller has nothing to resolve a situation against.
Acceptance criteria
data.references.situationsis always empty, including when an alert affects a route indata.listdata.listanddata.references.agenciesare unchangedincludeReferences=falsestill emptiesagenciesScope note
Only route-only alerts ever reached this path — alerts naming both a route and a stop never enter the by-route index (
internal/gtfs/realtime.go:682), so output is unchanged for them. The other fiveBuildSituationReferencescallers listed in #1377 are out of scope here.