OpenFeign / OpenFeign/feign

Undefined value in @QueryMap params works not as described

Open
#1,505 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Here is description of behavior for undefined values
https://github.com/OpenFeign/feign/blob/master/README.md#undefined-vs-empty-values

When I try to call client like this:

Map<String, Object> parameters = new LinkedHashMap<>();
parameters.put("param", null);
this.demoClient.test(parameters);

URL looks like /demo/client/url?param

Up to readme description, here
https://github.com/OpenFeign/feign/blob/248871dede1a00afab14dd12c0f18383aa10462e/core/src/main/java/feign/ReflectiveFeign.java#L300
need to add filter of null values.
Could you please confirm is it bug, or I misunderstand the description?

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 with the README section on undefined versus empty values and core/src/main/java/feign/ReflectiveFeign.java around line 300. Reproduce the @QueryMap call with a null value, then compare the generated URL with the documented behavior. Done means the null parameter handling matches the README description and the behavior is covered by an appropriate regression test.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.