Repository navigation
[pull] master from OpenAPITools:master - #810
Merged
Merged
Conversation
* fix: [dart] explode object query parameters
A query parameter whose schema is an object and whose style/explode are left at
their defaults — style: form, explode: true — must go on the wire as one
parameter per entry, keyed by the property name alone. The dart client handed
the whole map to _queryParams, which stringified it with Map.toString() into a
single parameter (filter={tld: com, createdDate:gte: 2023-01-01}).
The generated api now iterates an exploded map entry by entry at the call
site; _queryParams is left alone, since it never receives style or explode
and is still the right fallback for every other parameter. A free-form
object is typed Object in dart and needs a cast to Map; a declared map does
not. deepObject and explode: false objects keep their previous wire format,
byte for byte.
The new test fixture covers the four style/explode combinations that decide
the wire format; the test fails without the template change.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CxDNCjqJycKTfzVWg2SeTJ
* fix: [dart] repeat the key per element for a collection in an exploded object
An exploded form-style object query parameter handed each entry to
_queryParams with an empty collection format, which defaults to csv, so a
list value went out comma joined (tld=com%2Cnet) instead of once per element
(tld=com&tld=net). A Set went out as its toString(), since _queryParams only
expands a List, and a null element went out as an empty value.
Each entry is now passed with the 'multi' collection format, and an Iterable
value is turned into a List with its null elements dropped first, so the key
repeats once per non-null element and an empty collection adds nothing. The
closure parameter is typed dynamic so the Iterable check still compiles for a
map with a declared value type.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* chore: [dart] trim the exploded query comment
The shipped comment is one line now, without the implementation note.
Fix the fixture description, which claimed four style/explode
combinations where it covers three, and retitle the test.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* test: [dart] keep the shared fixture byte-identical with the other ports
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Fable 5 <noreply@anthropic.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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )