You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
When defining a GET APIs we might want to use many different optional query parameters to filter e.g a collection resource like /books. With the current generator one would need to define all the properties as separate query parameters on the operation, resulting in an interface method with a lot of method arguments.
The preferable way would be to have an object that contains all query parameters. This would make the interfaces more stable as method signature would not change if an optional query parameter is added. Also it makes passing the parameters around on both client and backend side a lot nicer.
Describe the solution you'd like
I would like the generator to support defining one single query parameter which is an object contains all the query parameters like below.
Is your feature request related to a problem? Please describe.
When defining a GET APIs we might want to use many different optional query parameters to filter e.g a collection resource like /books. With the current generator one would need to define all the properties as separate query parameters on the operation, resulting in an interface method with a lot of method arguments.
The preferable way would be to have an object that contains all query parameters. This would make the interfaces more stable as method signature would not change if an optional query parameter is added. Also it makes passing the parameters around on both client and backend side a lot nicer.
Describe the solution you'd like
I would like the generator to support defining one single query parameter which is an object contains all the query parameters like below.
Describe alternatives you've considered
Using a POST where payload contains the properties to filter by, but a benefit with GET is that one can see the parameters in access logs.
Additional context
Adding
{{#isModel}} @org.springframework.cloud.openfeign.SpringQueryMap{{/isModel}}
to queryParams.mustache seems to do the trick.The text was updated successfully, but these errors were encountered: