Search: Fix schema key content_type → type to match API response#3459
Conversation
The navigation-search API serializes NavigationSearchResultItem.Type as "type" (CamelCase policy). The previous fix incorrectly renamed the Zod key from "type" to "content_type", causing SearchResponse.parse() to fail on every result item. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
|
Warning Review limit reached
More reviews will be available in 12 minutes and 1 second. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (3)
✨ Finishing Touches✨ Simplify code
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 |
Why
The navigation-search API serializes
NavigationSearchResultItem.Typewith a CamelCase policy — the JSON key istype. A follow-up commit to the previous fix incorrectly renamed the Zod schema key fromtypetocontent_type, soSearchResponse.parse()failed on every result item in production.What
Reverts the Zod schema key back to
typein bothuseModalSearchQueryanduseNavigationSearchQuery, and updates the test fixture to match.