fix: remove undocumented fields from trip-details stopTimes schema#1072
fix: remove undocumented fields from trip-details stopTimes schema#10723rabiii wants to merge 1 commit into
Conversation
📝 WalkthroughWalkthrough
ChangesBlockStopTime data model refactor
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related issues
🚥 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 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 |
|



Description
This PR addresses by removing extra fields from the
trip-detailsresponse that were not defined in the wiki spec, reducing payload noise and strictly adhering to the API contract.Changes Included:
DropOffTypeandPickupTypefrom the baseStopTimestruct ininternal/models/stop_times.goto match thetrip-detailsspec.blockendpoint does require these fields in its spec, I introduced a newBlockStopTimeDatastruct ininternal/models/block.go. This wrapper embeds the cleanStopTimeand appends the necessary drop-off/pickup types.block_handler.goto construct the response using the newBlockStopTimeDatawrapper, isolating the schemas without duplicating core logic.stop_times_test.goto reflect the removed fields.Fixes: #1057
Summary by CodeRabbit
Release Notes