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

Does @SpringQueryMap Support Multiple Annotations or Nested Objects?

Open
#1,164 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

waiting-for-triage
Dominant language
Java
Stars
1.3k
Forks
838
Avg merge
2d 11h
Merged PRs (30d)
13

Description

  1. Can I use multiple @SpringQueryMap annotations in a single method?
@FeignClient(name = "exampleClient", url = "https://api.example.com")
interface ExampleClient {

    @GetMapping("/example")
    fun search(
        @SpringQueryMap params1: QueryParams,
        @SpringQueryMap params2: QueryParams
    ): String
}
  1. Does @SpringQueryMap support nested objects?
data class ParentParam(
    val a: String,
    val child: ChildParam // Nested object
)

data class ChildParam(
    val b: String,
    val c: String
)

@FeignClient(name = "exampleClient", url = "https://api.example.com")
interface ExampleClient {
    @GetMapping("/example")
    fun search(@SpringQueryMap params: ParentParam): String
}

As far as I know, spring-cloud-openfeign does not support either of these.
Why doesn’t spring-cloud-openfeign support them?

If supporting these features does not go against your direction and you have no plans to implement them, would it be okay if I attempt to make the modifications and submit a PR?

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

The issue identifies @SpringQueryMap and the ExampleClient method signatures as the entry points; start by tracing how those annotations are handled in the repository. Compare current behavior for repeated parameters and nested objects, then establish tests that define the supported behavior before considering implementation.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, kotlin, spring
Domain
api, backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.