docs: document array query parameter formats for Query binder#4116
docs: document array query parameter formats for Query binder#4116ReneWerner87 merged 3 commits intomainfrom
Conversation
Add a comprehensive "Array Query Parameters" subsection to the Query binder documentation covering all supported formats: - Repeated key (?k=a&k=b) - Bracket notation (?k[]=a&k[]=b) - Comma-separated values (?k=a,b) with EnableSplittingOnParsers - Indexed bracket notation for nested structs (?posts[0][title]=...) - Nested bracket notation without index (?prefs[tags]=...) Each format includes struct definitions, curl examples, and notes on configuration requirements. https://claude.ai/code/session_013uGgsF9zw8uKryMH9uRGnv
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the documentation for Fiber's Query binder by introducing a dedicated section on how to handle array query parameters. The new content clarifies the various supported formats and provides practical examples, making it easier for developers to correctly bind array values from URL queries to Go structs. This improves the clarity and completeness of the API documentation. Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review infoConfiguration used: Repository UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughAdded a comprehensive "Array Query Parameters" section to Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 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 |
Fix markdownlint MD040 violations by adding `text` language specifier to all bare fenced code blocks. https://claude.ai/code/session_013uGgsF9zw8uKryMH9uRGnv
There was a problem hiding this comment.
Code Review
This pull request adds excellent and comprehensive documentation for binding array query parameters in various formats. The examples are clear and cover common use cases. I have one suggestion to improve clarity in the 'Nested Bracket Notation (Without Index)' section by explaining the use of pointers, which could be confusing for some users.
There was a problem hiding this comment.
Pull request overview
Adds documentation to the Query binder guide explaining the supported ways to pass and bind array-like query parameters in Fiber.
Changes:
- Introduces a new “Array Query Parameters” subsection under the Query binder docs.
- Documents repeated-key, bracket notation, comma-separated (with
EnableSplittingOnParsers), indexed bracket notation for nested structs, and nested bracket notation for nested structs.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@docs/api/bind.md`:
- Around line 476-482: Add a missing row to the overview table for the fifth
format "Nested bracket notation (without index)"; insert a new table row between
the existing rows with Format = "Nested bracket notation (without index)",
Example = "`?filters[colors][]=red&filters[colors][]=blue`" (or a similar
nested-bracket example matching the detailed section), and Requires
`EnableSplittingOnParsers` = "No" so the summary table at the top matches the
detailed section (lines ~596-618) describing the nested bracket format.
- Add missing "Nested bracket notation" row to the overview table so it matches the five subsections below - Fix result comment to use *Prefs.Tags (pointer dereference) since Tags is *[]string - Add a note explaining why pointer fields are useful (distinguishing missing vs empty parameters) https://claude.ai/code/session_013uGgsF9zw8uKryMH9uRGnv
Add a comprehensive "Array Query Parameters" subsection to the Query
binder documentation covering all supported formats:
Each format includes struct definitions, curl examples, and notes on
configuration requirements.
https://claude.ai/code/session_013uGgsF9zw8uKryMH9uRGnv