Skip to content

Preserve literal query values and expand array parameters - #3624

Merged
velo merged 2 commits into
OpenFeign:masterfrom
hutiefang76:frank/feign-investigate-20261018
Nov 9, 2026
Merged

velo merged 2 commits into
OpenFeign:masterfrom
hutiefang76:frank/feign-investigate-20261018

Conversation

@hutiefang76

@hutiefang76 hutiefang76 commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Literal query commas were treated as collection separators, so ?ids=1,2 became ?ids=1&ids=2. Primitive-array query-map values and default array expressions also sent Java array identity strings instead of their elements.

Preserve literal/scalar query values and expand arrays through the existing element encoders. Collection expressions keep their current CollectionFormat behavior, and custom Param.Expander implementations still receive arrays as whole values. Add regression coverage plus README and 13.18 changelog notes. Mixed literal-comma/collection templates keep their existing expansion behavior, as documented.

Validation:

  • Core: mvn -Pdev -pl core test — 795 tests, no failures, 4 existing skips; Java 8 main toolchain and JDK 27 test JVM.
  • Root: mvn -Pdev validate passed with a task-local toolchains file registering the installed JDK 11 alongside the existing toolchains.
  • Baseline failures reproduced before the fix; independent source review completed.

Fixes #3623

Remote Actions currently reports action_required with no jobs executed; local validation is complete.

Signed-off-by: hutiefang76 <137664623+hutiefang76@users.noreply.github.com>

@velo velo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Compared master and this branch through RequestTemplate.resolve: scalar values were already pct-encoded so they're unaffected, int[]/String[] now expand in query and path instead of sending identity strings, and Iterable/Map/Optional expansion is unchanged under both EXPLODED and CSV. The real behaviour changes are that a literal ?ids=1,2 and an all-scalar template like ?ids={a},{b} now stay one value instead of becoming repeated params. I think that's the right call and it's in the CHANGELOG, but it would be worth calling out the {a},{b} case explicitly in that bullet. @hutiefang76 this now conflicts in CHANGELOG.md (13.18 section, #3658 adds one too), could you merge master and resolve?

Signed-off-by: Marvin Froeder <velo.br@gmail.com>

# Conflicts:
#	CHANGELOG.md
@velo
velo enabled auto-merge (squash) November 9, 2026 21:01
@velo

velo commented Nov 9, 2026

Copy link
Copy Markdown
Member

Merged master; CHANGELOG.md was removed from the repo so the entry was dropped.

@velo
velo merged commit f1cc805 into OpenFeign:master Nov 9, 2026
3 checks passed
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.

Query values are split at literal commas or lost when arrays are used

2 participants