0

External API is exposing resources with the search parameter.

This is the targeted endpoint: https://example.com/api/categories/?filter[name]=[somename]&display=full

I'm using quarkus with org.eclipse.microprofile.rest.client.inject.RegisterRestClient. I'm trying to somehow map filter parameter with available parameters from javax.ws.rs without luck.

The implementation is done for client, i don't want to get parameter i want to put them into the request.

 @GET
  @Produces(MediaType.TEXT_XML)
  CategoriesResponse searchCategoryByName(@DefaultValue("full") @QueryParam("display") String display, <How to implement this param> Filter f

Any ideas?

kingkong
  • 1,537
  • 6
  • 27
  • 48
  • Get all query parameters, iterate them, and use the ones starting with `filter`. – Andreas Oct 15 '20 at 05:50
  • This implementation is for client implementation with `org.eclipse.microprofile.rest.client.inject.RegisterRestClient` not a server site, this is not relevant – kingkong Oct 15 '20 at 06:14
  • I've work it around with `@GET @Produces(MediaType.TEXT_XML) CategoriesResponse searchCategoryByName(@DefaultValue("full") @QueryParam("display") String display, @QueryParam("filter[name]") String string);` but i don't think this is best solution. – kingkong Oct 15 '20 at 06:17

0 Answers0