Reputation: 2525
It appears that I can safely use plain java collections as return types (as long as they contain entities) in my Endpoint APIs. I was wondering if I'm missing something. Is there any benefit to using CollectionResponse instead?
Thank you.
Upvotes: 5
Views: 903
Reputation: 2322
Yes, you can safely use collections (doc here). The advantage of CollectionResponse is the built in support for paging and other nice-to-have features.
Upvotes: 5