Details
Description
When doing a REST call for finding values and expecting a collection of objects back there is an inconsistency with Causeway (2.x) vs Isis (1.x).
When querying for a value that returns an empty list:
For 1.x the result is an empty collection.
For 2.x the result is a http 404 error.
It's a matter of what to return for an empty collection versus an empty object.
The functionality for this is located at:
ContentNegotiationServiceXRoDomainType#buildResponse
Possible solutions may be:
- Don't change anything, the REST client should handle this
- Add logic that checks the return type and returns an empty collection in the ContentNegotiationServiceXRoDomainType#buildResponse method
- Add logic that checks and returns an empty collection in the
_ManagedObjectEmpty#getPojo method - Create a _ManagedCollectionEmpty or
_ManagedListEmpty object for wrapping the return value of an empty Collection - None of the above
Attachments
Issue Links
- links to