the-bed-stack
the-bed-stack copied to clipboard
Reconsider `toResponse` mapper in service layer
Clear and concise description of the problem
Arguably, toResponse mapping should be a controller-level concern, and the service layer should not be aware of it.
Suggested solution
Move all toResponse invocations to the controller layer.
Alternative
Leave the toResponse invocations where they are in the service layer, if we determine that the service layer should have knowledge of the desired API-level format.
Additional context
Consider our "project structure" and "architecture" docs.
Validations
- [x] Read the Contributing Guide.
- [x] Read the
README.md. - [x] Check that there isn't already an issue that requests the same feature.