Support includeReferences=false in route-search#1204
Conversation
The route search handler previously queried and populated agency and situation references unconditionally, ignoring the includeReferences query parameter. This commit leverages the existing ShouldIncludeReferences utility to parse the parameter and conditionally bypass the database queries for agencies and situations when references are not requested. A new unit test has been added to verify that the references block remains empty when includeReferences is set to false, preventing future regressions and reducing payload overhead as defined by the specification.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughRoute search now honors ChangesRoute search reference filtering
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related issues
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
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 |
|
|
@coderabbitai full review |
✅ Action performedFull review finished. |



Description
This PR adds support for the
includeReferencesquery parameter in thesearch-routeendpoint, bringing it into compliance with the OBA spec and matching the behavior of sibling endpoints.Key Changes:
ShouldIncludeReferencesutility to parse the query parameter.includeReferences=falseis provided, returning an empty references block and reducing payload size.TestRouteSearchHandlerIncludeReferencesFalseto explicitly test this boundary condition and prevent regressions.closes #1198
Summary by CodeRabbit
New Features
Bug Fixes