Open manjushetkar opened 7 years ago
I would think that, given the parameters are effectively optional, you should expect this:
"href": "http://localhost:8082/greet{?param1,param2}"
I experience the same issue.
Javadoc of RequestParam#defaultValue
states that
Supplying a default value implicitly sets
required
tofalse
.
However in order to get those params templated I have to explicitly specify required = false
in each and every RequestParam
annotation with defaultValue
.
It would be great to know whether this issue is taken into consideration.
We ran into this issue as well. Shouldn't fixing it be as easy as calling !isRequired() || parameter.isOptional()
instead of !(annotation != null && annotation.required()) || parameter.isOptional()
in org.springframework.hateoas.server.core.WebHandler.RequestParamParameter#getVerifiedValue(Object[])
I am getting,
while I am expecting,
is this the expected behaviour or am I missing something?
169
Templating just works fine when I have optional request params with default values, but they are omitted when they are required and have default values.