feat: implement includeReferences query parameter in trip-details#1068
feat: implement includeReferences query parameter in trip-details#10683rabiii wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe PR implements the ChangesInclude References Parameter Implementation
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 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 implementing the
includeReferencesquery parameter for thetrip-detailsendpoint.Previously, the endpoint always built and serialized the full references object, ignoring caller intent. Now, when
includeReferences=falseis provided, the handler skips the reference-building logic entirely.Changes Included:
if includeReferencescondition. When false, we avoid unnecessary database queries, significantly speeding up the response.referencesobject is still present in the JSON envelope, but all its internal collections are initialized as empty arrays[], precisely matching the wiki specification.TestTripDetailsHandlerWithIncludeReferencesFalseto assert all 5 reference collections are empty while entry data remains intact.TestTripDetailsHandlerWithIncludeReferencesDefault(table-driven) to verify that both an absent parameter and an explicitlytrueparameter default to populating the references.fixes: #1053
Summary by CodeRabbit