79249447

Date: 2024-12-03 23:20:08
Score: 1.5
Natty:
Report link

You won't go away from creating a new object (I mean internally somewhere new object will still be created), if we are talking about API responses, a good approach is using DTO objects, that is simple data class, that contain all of the needed properties and even if you decide to extend your base object, you will not get those props as a result of endpoint, only adding those to DTO will do.

Reasons:
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (0.5):
Posted by: Red Star