Skip to content

Fix nullable query param - #24738

Merged
wing328 merged 3 commits into
OpenAPITools:masterfrom
FlagshipApps:feat/fix-nullable-query-param
Aug 19, 2026
Merged

wing328 merged 3 commits into
OpenAPITools:masterfrom
FlagshipApps:feat/fix-nullable-query-param

Conversation

@bw-flagship

@bw-flagship bw-flagship commented Aug 19, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #24736

--

@jaumard (2018/09) @amondnet (2019/12) @sbu-WBT (2020/12) @kuhnroyal (2020/12) @agilob (2020/12) @ahmednfwela (2021/08)

PR checklist

  • Read the contribution guidelines.
  • Run the following to build the project and update samples:
    ./mvnw clean package || exit
    ./bin/generate-samples.sh ./bin/configs/*.yaml || exit
    ./bin/utils/export_docs_generators.sh || exit
    
    (For Windows users, please run the script in WSL)
    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.
  • If your PR is targeting a particular programming language, @mention the technical committee members, so they are more likely to review the pull request.

Summary by cubic

Makes dart-dio clients omit optional query parameters when the provided value is null. Previously, optional nullable params were emitted as key=null; now guards follow requiredness: optional params are omitted when null, while required params (including nullable) are always sent. Fixes #24736.

  • Apply an if (param != null) guard to all non-required query params in api.mustache.
  • Add an OpenAPI 3.1 fixture and a regression test covering optional vs. required (including nullable) behavior.
  • No change to encoding or required parameter handling; regenerate clients.

Written for commit f95c2e5. Summary will update on new commits.

Review in cubic

@bw-flagship
bw-flagship marked this pull request as ready for review August 19, 2026 13:35

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 3 files

Re-trigger cubic

@wing328 wing328 added this to the 7.25.0 milestone Aug 19, 2026
@wing328
wing328 merged commit 2905e4f into OpenAPITools:master Aug 19, 2026
12 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Dart-Dio: Optional query params should be omitted

2 participants