[http-specs] Add explode object query parameter Spector scenario#11125
Merged
JoshLove-msft merged 3 commits intoJul 3, 2026
Merged
Conversation
commit: |
Contributor
|
All changed packages have been documented.
Show changes
|
Add a scenario (Parameters_Query_Explode_object) covering a model-valued query parameter with \@query(#{ explode: true })\, which per RFC 6570 form explode expands each property into its own query entry (\?field=status&value=active\). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
7033804 to
0f208f3
Compare
|
You can try these changes here
|
30a52f2 to
15a1a9c
Compare
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
weidongxu-microsoft
approved these changes
Jul 1, 2026
weidongxu-microsoft
left a comment
Contributor
There was a problem hiding this comment.
Approved. The scenario correctly models RFC 6570 form-style query expansion with explode ({?keys*}, §3.2.9): an object-valued query parameter with @query(#{ explode: true }) expands each property into its own
ame=value entry using the property name as the key (?field=status&value=active), with the parameter name itself dropped.
Address PR feedback: relocate the exploded model-valued query parameter scenario from parameters/query into the routes query-expansion/explode section alongside the existing primitive/array/record cases. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
jorgerangel-msft
approved these changes
Jul 2, 2026
timotheeguerin
approved these changes
Jul 3, 2026
tadelesh
pushed a commit
that referenced
this pull request
Jul 9, 2026
) Adds Spector coverage for the gap behind #11123 / #10973. There was **no** Spector scenario exercising a complex/model-typed query parameter, so exploded-object query serialization was untested across emitters. ## What New `@typespec/http-specs` scenario `Parameters_Query_Explode_object` (`GET /parameters/query/explode/object`): a model-valued query parameter with `@query(#{ explode: true })`, which per RFC 6570 form explode expands each property into its own query entry (`?field=status&value=active`). Includes the regenerated `spec-summary.md`. ## Validation - `pnpm validate-scenarios`, `pnpm validate-mock-apis`, and summary regen all pass. ## Follow-ups This PR contains only the shared spec scenario. Per-emitter tests come later: - C# emitter fix: #11124 - C# Spector test + generated client: a follow-up PR (depends on #11124). The shared scenario also unblocks the JS emitter side (#10973). --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
Adds Spector coverage for the gap behind #11123 / #10973.
There was no Spector scenario exercising a complex/model-typed query parameter, so exploded-object query serialization was untested across emitters.
What
New
@typespec/http-specsscenarioParameters_Query_Explode_object(GET /parameters/query/explode/object): a model-valued query parameter with@query(#{ explode: true }), which per RFC 6570 form explode expands each property into its own query entry (?field=status&value=active). Includes the regeneratedspec-summary.md.Validation
pnpm validate-scenarios,pnpm validate-mock-apis, and summary regen all pass.Follow-ups
This PR contains only the shared spec scenario. Per-emitter tests come later:
The shared scenario also unblocks the JS emitter side (#10973).