spring-cloud / spring-cloud/spring-cloud-openfeign

@SpringQueryMap nested object support

Open
#442 7 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement help wanted
Dominant language
Java
Stars
1.3k
Forks
838
Avg merge
2d 11h
Merged PRs (30d)
13

Description

FeignClient

interface MyFeignClient{
    @GetMapping(params = {"projection=wishSummary"})
   Object get(
            @SpringQueryMap MyObject myObject);
}

MyObject

class MyObject{
   Range range;
}
class Range{
  Integer from;
  Integer to;
}

Feign will build query param like "Range(from=1,to=2)" when I call MyFeignClient.get

I need a query param like "range.from=1&range.to=2" at the example

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 from the @SpringQueryMap handling used by the FeignClient entry point and trace how MyObject fields become query parameters. Reproduce the nested Range case, then verify that the completed behavior emits separate range.from=1 and range.to=2 parameters rather than a single Range value.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring
Domain
api, backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.