Creating a client which receives a List query parameter, while using a @QueryValue annotation produces the wrong output.
Example:
@Get("/api/v1/stuff{?name*}")
public Object functionName(@QueryValue(value = "name") List<String> name);
Calling this client with a list containing ABC, DEF:
http://localhost:51008/api/v1/stuff?name=ABC,DEF://localhost:51008/api/v1/stuff?name=ABC&namespace=DEFWorkaround for this issue is removing the @QueryValue annotation.
@Get("/api/v1/stuff{?name*}")
public Object functionName(List<String> name);
Calling this client with a list containing ABC, DEF:
://localhost:51008/api/v1/stuff?name=ABC&namespace=DEF as expected.Tested using 1.2.2 and 1.2.7 Micronaut versions.
@RuiffCardoso It works with the following:
@Client("/stuff")
public interface StuffClient {
@Get("{?names*}")
HttpResponse<List<Stuff>> get(@QueryValue("names") List<String> names);
}
Edit: Here is the sample application
wrongqueryparameters.zip
@RuiffCardoso I am sorry it seem like my sample is replicating the problem and got confused with something else. I will look into fixing the same.
Most helpful comment
@RuiffCardoso I am sorry it seem like my sample is replicating the problem and got confused with something else. I will look into fixing the same.