fix: trip endpoint spec gaps — routeShortName source and includeReferences#1063
fix: trip endpoint spec gaps — routeShortName source and includeReferences#1063Ahmedhossamdev wants to merge 1 commit into
Conversation
…rences functionality
📝 WalkthroughWalkthroughThe trip endpoint handler is updated to remove per-trip route short name population (hardcoded to empty string) and to support conditional reference inclusion via an ChangesTrip endpoint response handling
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related issues
Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Performance Smoke Test ResultsStatus: PASSED
Smoke test config: 5 VUs x 30s. Thresholds: p(95) < 300ms, error rate < 1%. Full results uploaded as workflow artifact: k6-smoke-summary. |



Fixes: #987, #1062
Fixes two spec gaps in
/api/where/trip/{id}, both verified byte-for-byte against the Java reference server.1.
entry.routeShortNamesourced from the wrong tableIt read the route's short name; the spec/Java define it as the trip's own per-trip route short name (GTFS
trips.txt route_short_name). Maglev doesn't store that column, so the parity-correct value is"". Clients fall back toreferences.routes[].shortNameas the spec instructs.2.
includeReferences=falseignoredThe handler never read the parameter and always populated references. Now parses it (default
true) and returns empty reference arrays whenfalse.Summary by CodeRabbit
New Features
includeReferencesquery parameter to the trip endpoint. When set tofalse, reference data (routes, agencies, stops, trips, situations) are excluded from responses. References are included by default.Bug Fixes
Tests
includeReferencesparameter functionality.