eclipse-ee4j / jersey

Eclipse Jersey Project - Read our Wiki:
https://github.com/eclipse-ee4j/jersey/wiki
Other
691 stars 352 forks source link

Declarative Linking support for List of entities #3253

Open jerseyrobot opened 9 years ago

jerseyrobot commented 9 years ago

Declarative Linking is a useful—not to say necessary—feature to implement a HATEOAS RESTful service, but it lacks support for injecting Link headers in responses where the entity is a List (a very common case for GET requests). I guess it depends on the fact that the Response filter can't retrieve the List generic type at runtime, then why not use the linking annotation on the resource class and methods instead (or in addition) of using them on the entity? The the Response filter will know which links to inject in the response headers—still being able to expand parametrized URIs when the entity is not a List but a proper entity class instance.

Affected Versions

[2.22]

jerseyrobot commented 6 years ago
jerseyrobot commented 9 years ago

@glassfishrobot Commented Reported by heruan

jerseyrobot commented 7 years ago

@glassfishrobot Commented This issue was imported from java.net JIRA JERSEY-2981