#3584·feign

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

Author: kdelayCreated Sep 26, 2026Updated Sep 26, 2026

Expressions.SimpleExpression#expandMap stringifies each entry value, so {;params} with a Map does not expand a collection or array entry.

On master (68b96d1), UriTemplate.create("/server{;parameters}", UTF_8).expand(...):

parameters expanded
{colours=[red, blue], size=L} /server;colours=%5Bred%2C%20blue%5D;size=L
{colours=String[]{"red","blue"}} /server;colours=%5BLjava.lang.String%3B%403567135c

As a top-level variable the same values go through expandIterable: {;colours} with List.of("red","blue") gives /server;colours=red;colours=blue. A map entry should expand the same way, giving /server;colours=red;colours=blue;size=L.

The array case also puts an identity hash in the URL.

Found from spring-cloud/spring-cloud-openfeign#1421.