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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With