feat: add CollectionFormat.Indexed for indexed query collection expansion#2262
Merged
glennawatson merged 20 commits intoJul 21, 2026
Merged
Conversation
…sion Adds a new CollectionFormat.Indexed value that expands an IEnumerable<T> of complex objects into indexed key-prefix query parameters: ?items[0].Id=1&items[0].Value=a&items[1].Id=2 Both the source generator (inline, zero-reflection) and the reflection request builder paths are implemented. The generator parses an IEnumerable<T> parameter with CollectionFormat.Indexed and a complex element type into the new QueryParameterShape.DeepObjectCollection shape, emitting a loop with an incrementing index local and flattening each element's properties under the key[index].Property naming scheme. Closes reactiveui#2256 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
jgarciadelanoceda
marked this pull request as draft
July 20, 2026 00:15
Removed severity setting for file length maximum in test projects.
…noceda/refit into feature_2256_Indexed
jgarciadelanoceda
marked this pull request as ready for review
July 20, 2026 14:17
Contributor
|
For |
glennawatson
left a comment
Contributor
There was a problem hiding this comment.
Solid approach - both the inline generator and reflection paths, docs, tests, and full public-API coverage. A few things before merge:
glennawatson
approved these changes
Jul 21, 2026
Contributor
|
Thanks, will likely be another 14.0 beta release tomorrow with this change in it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What kind of change does this PR introduce?
Feature Closes #2256
What is the new behavior?
Adds a new CollectionFormat.Indexed value that expands an IEnumerable of complex objects into indexed key-prefix query parameters:
?items[0].Id=1&items[0].Value=a&items[1].Id=2
Both the source generator (inline, zero-reflection) and the reflection request builder paths are implemented. The generator parses an IEnumerable parameter with CollectionFormat.Indexed and a complex element type into the new QueryParameterShape.DeepObjectCollection shape, emitting a loop with an incrementing index local and flattening each element's properties under the key[index].Property naming scheme.
What is the current behavior?
It was possible with QueryFormatter
What might this PR break?
n/a
Checklist
mainbranch