Our team needs to consume a rest-ish API that expects path parameters in the form of
api/v1/foo?bar=baz or api/v1/foo?bar=[baz]
Now, if we use @QueryParam("bar") String bar, the result is foo?bar=[baz] (if bar.equals("[baz]") of course), which the API does not accept.
What we can do ist write something like @QueryParam("bar[baz]") String bar which results in foo?bar[baz]=asdf. This works, but unfortunately there is also bar[qux] and bar[quux], and we would have to create a request method for every possible value that bar can take (and combinations thereof).
So instead of getBar(@QueryParam("bar") List<String> bar ...
we need to create
getBar(@QueryParam("bar[baz]") String bar ...
getBar(@QueryParam("bar[qux]") String bar ...
getBar(@QueryParam("bar[baz]") String bar, @QueryParam("bar[qux]") String bar ...
... // and so on
Is there any way we can influence how resty generates the query string?