Skip to content

fix: apply defaults to absent exploded query arrays - #1116

Merged
wolveix merged 3 commits into
danielgtaylor:mainfrom
Arvin-Lee:bugfix/1114-exploded-query-default
Sep 24, 2026
Merged

wolveix merged 3 commits into
danielgtaylor:mainfrom
Arvin-Lee:bugfix/1114-exploded-query-default

Conversation

@Arvin-Lee

Copy link
Copy Markdown
Contributor

Fixes #1114.

Exploded query arrays previously ignored their declared default when the parameter was absent, leaving the slice nil. Apply the comma-separated default only when the query parameter is missing, preserving explicit values and non-exploded behavior.

Adds seven regression cases covering missing parameters, explicit single and repeated values, literal commas, and empty values.

Validation on Go 1.27.1:

  • All new regression cases pass; missing-parameter cases failed before the fix.
  • Full tests and race tests pass except for four existing YAML tests, which also fail on unmodified HEAD.
  • Examples compile using a temporary module file to resolve existing missing go.sum entries.
  • git diff --check passes.

@codecov

codecov Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.19%. Comparing base (8e4bada) to head (1e4b8dd).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1116      +/-   ##
==========================================
+ Coverage   93.16%   93.19%   +0.02%     
==========================================
  Files          24       24              
  Lines        4991     5008      +17     
==========================================
+ Hits         4650     4667      +17     
  Misses        273      273              
  Partials       68       68              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@wolveix
wolveix merged commit 47f6975 into danielgtaylor:main Sep 24, 2026
4 checks passed
@wolveix

wolveix commented Sep 24, 2026

Copy link
Copy Markdown
Collaborator

Thanks @Arvin-Lee!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Exploded array query parameter ignores its declared default

2 participants