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
Query parameter defined as @QueryValue(value = "v", defaultValue = "") List<String> values should default to an empty list when parameter is not present. This was working in Micronaut 3, but doesn't in Micronaut 4.
Alternatively, there should be a documented way how to declare such parameter if this syntax turns out to be insufficient (e.g. to be able to distinguish between ?v= (parameter specified, but without value) vs ? (no parameter specified).
Actual Behaviour
List with a single element of an empty string is passed as an argument.
Steps To Reproduce
Run example app
Execute curl http://localhost:8080/list-nullable
Expected output (empty list is passed to the method):
Expected Behavior
Query parameter defined as
@QueryValue(value = "v", defaultValue = "") List<String> values
should default to an empty list when parameter is not present. This was working in Micronaut 3, but doesn't in Micronaut 4.Alternatively, there should be a documented way how to declare such parameter if this syntax turns out to be insufficient (e.g. to be able to distinguish between
?v=
(parameter specified, but without value) vs?
(no parameter specified).Actual Behaviour
List with a single element of an empty string is passed as an argument.
Steps To Reproduce
curl http://localhost:8080/list-nullable
Environment Information
No response
Example Application
https://github.com/mancze/micronaut-sandbox/tree/repro/optional-list-query-parameter
Version
4.3.8
The text was updated successfully, but these errors were encountered: