Help with clean architecture
I wondered how I could return the DTO without breaking anything.
Here is the code from the service where I access the entity.
And here in the controller
I could create a mapper right here in the controller, but is that a good approach?
If I'm doing anything, it's purely because I don't like the way it glows in the swager.
Here:
and the DTO that should replace the Todo entity itself looks virtually identical to it, but the point is that I don't think it's a good idea to expose the entity.
Here is the code from the service where I access the entity.
And here in the controller
I could create a mapper right here in the controller, but is that a good approach?
If I'm doing anything, it's purely because I don't like the way it glows in the swager.
Here:
and the DTO that should replace the Todo entity itself looks virtually identical to it, but the point is that I don't think it's a good idea to expose the entity.
