URI template with '*' for parameters that support multiple values [DATACMNS-780]
Mirco Andreon opened DATACMNS-780 and commented
Hello, I created a search service like this for my resource:
List<Booking> findByStatusIn(@Param("status") Collection<BookingStatus> status);
Hence it allows multiple values for parameter "status".
When I invoke http://localhost:8080/myapp/rest/myresources I get:
{
"_links" : {
"findByStatusIn" : {
"href" : "http://localhost:8080/myapp/rest/myresources/search/findByStatusIn{?status}",
"templated" : true
}
}
}
This seems incorrect, since the "href" should be "http://localhost:8080/myapp/rest/myresources/search/findByStatusIn{?status*}, that is include an asterisk after the parameter name. This comes from RFC 6570 as stated here https://github.com/basti1302/traverson/issues/41
Affects: 1.9.3 (Evans SR3), 1.10.2 (Fowler SR2), 1.11 GA (Gosling)
Reference URL: https://github.com/basti1302/traverson/issues/41
1 votes, 3 watchers
Oliver Drotbohm commented
Needs to be fixed in Spring HATEOAS first with a follow up fix in Spring Data Commons
Any update on this issue? I am struggling to figure out how to specify multiple sort params with spring data's Traverson Java client. It looks like it's currently not possible to do this.