Conversation
…pile The exploded deepObject branch walks every map-flagged parameter with .len()/.iter() - fine for a HashMap-typed map (an object schema with declared additionalProperties), but a bare free-form object is a serde_json::Value, which has neither, so the generated crate did not compile. Split the branch on isContainer and walk the Value through as_object(): a non-object Value sends nothing, matching the parameter's declared object shape. The second of the two follow-ups promised in #24866's body. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GcwZ1arjLZNpetHz2a3TJz
Review pointed out the branch emitted unprefixed json-quoted pairs - not the deepObject wire format the style asks for - and that was true of the pre-existing HashMap iteration too. Both shapes (typed map and free-form serde_json::Value) now take crate::apis::parse_deep_object, the route the non-explode branch already uses: name[key]=value on the wire, one code path, and the Value shape compiles because to_value accepts both. The fixture gains a required-nullable parameter so all patched sites are exercised, and the test registers the generated tree for cleanup. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GcwZ1arjLZNpetHz2a3TJz
… shape
The four comment copies repeated what the identical non-explode block
already says. The test is renamed for what it checks, and the fixture's
`filter` becomes a typed map (`additionalProperties: {type: string}`),
the shape whose wire format this change affects.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…iebren/openapi-generator into wiebren-fix/rust-deep-object-free-form
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.
PR checklist
Commit all changed files.
This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
These must match the expectations made by your contribution.
You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example
./bin/generate-samples.sh bin/configs/java*.IMPORTANT: Do NOT purge/delete any folders/files (e.g. tests) when regenerating the samples as manually written tests may be removed.
Summary by cubic
Fixes Rust template generation for exploded
deepObjectmap and free-form object query parameters, which previously emitted unprefixed, JSON-quoted query pairs and produced non-compiling code for free-form objects.serde_json::Valueparameters now route throughcrate::apis::parse_deep_object, matching the non-explode branch and producing thename[key]=valuewire format.Written for commit ce26f36. Summary will update on new commits.