1

I'm using the @SpringQueryMap annotation on my Feign client and I need to convert the format of the key that will be used as query params

data class MyQuery(
    val userId: String,
    val validAt: LocalDate
)


interface Client {

    @GetMapping("/v1/my-endpoint/")
    fun find(@SpringQueryMap queryMap: MyQuery): String
}

Using the example above the URL would be:

/v1/my-endpoint/userId=X&validAt=Y

How can I convert the key format from camel case to kebab case?

The final result should be:

/v1/my-endpoint/user-id=X&valid-at=Y
Rafa Acioly
  • 530
  • 9
  • 34

0 Answers0