OpenFeign / OpenFeign/feign

Query param with comma produce multiple query params

Open
#1,449 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feedback provided
Dominant language
Java
Stars
9.8k
Forks
1.9k
Avg merge
1d 2h
Merged PRs (30d)
41

Description

Hi,

Client:

import java.net.URI;
import java.util.Map;

import feign.HeaderMap;
import feign.RequestLine;
import feign.Response;

public interface GenericFeignApi {
  @RequestLine("GET")
  Response get(URI uri, @HeaderMap Map<String, Object> headers);
}

Open feign 11.1 produces ?param=first&param=second&param=third

expected: ?param=first,second,third

#924 #922 - These issues are similar and got fixed by https://github.com/OpenFeign/feign/pull/930
but I am still experiencing it in OpenFeign 11.1

P.S. Currently I am able to get it work by url-encoding 'comma' in the query param before providing it to Feign as proposed in #924 #922

Thanks.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the request from the GenericFeignApi example using @RequestLine, URI, and @HeaderMap, then trace the query-parameter serialization path. Compare the generated URL with the expected single comma-separated parameter and confirm the behavior with a regression test covering comma-containing values.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.