
Calling persistence port from REST controller in hexagonal arquitecture
I have been using hexagonal since 1 year and a half, working with a fantastic tech lead who teach me very good fundamentals (that's at least what I believe), but there is something that I learnt with him but I do not agree.
In GET, DELETE & even in POST & PATCH endpoints with no business logic to be implemented, just normal CRUD with no validations or other stuff, we are calling persistence ports directly from REST controller, instead of calling the usecase port and call the persistence port from there (because for him this is "dead code", just created to be like a bridge, with no real logic implemented). From my perspective, although I get his point, I think this violates the SoC principle.
Just in case you wanna understand better what I try to say, I have this project made by me, in which I violate the SoC principle too xd.
Am I wrong, is my TL wrong or this is not black or white and maybe we both have something?
Thank you for reading! Any comment would be welcome!