Skip to content

Expand collection values inside path-style maps - #3587

Merged
velo merged 1 commit into
OpenFeign:masterfrom
kalayciburak:fix/path-style-map-collection-values
Oct 2, 2026
Merged

velo merged 1 commit into
OpenFeign:masterfrom
kalayciburak:fix/path-style-map-collection-values

Conversation

@kalayciburak

Copy link
Copy Markdown
Contributor

Path-style expansion already repeats the variable name for a list ({;list} with red, green, blue becomes ;list=red;list=green;list=blue). A list or array stored as a map value was encoded with Object.toString(), so {;parameters} with colours=[red, blue] became ;colours=%5Bred%2C%20blue%5D, and a String[] put its identity hash in the URL.

Collection and array values now expand the same way as a named list. Scalar map values are unchanged. Null elements in a collection are skipped.

Fixes #3584

Test plan

  • mvn -pl core test -Dtest=UriTemplateTest — 33 tests, 0 failures (list value, array value, reserved-character encoding, existing scalar map)
  • mvn -pl core test -Dtest=FeignTest#matrixParametersAreSupported,FeignTest#matrixParametersAlsoSupportMaps — passed
  • mvn -pl core test — passed
  • mvn -pl core validate — passed
  • mvn -pl core -Pdev test -Dtest=UriTemplateTest — passed (google-java-format)

Path-style expansion already repeats the variable name for a list.
A list or array stored as a map value was encoded with Object.toString(),
so the URL contained a bracketed list or an array identity hash.

Fixes OpenFeign#3584
@velo
velo merged commit 1f02e66 into OpenFeign:master Oct 2, 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.

Path-style expansion does not expand collection values inside a map

2 participants