I have a multimodule app which contains the following 2 module API and Core
API module contains all APIs
CORE module contains services, daos and entities
Core cannot see API since CORE is actually a dependency in API
Core is a dependency in API in which app runs the API directly
Now I have 2 problems
First APIs use DTOS so where DTO package has to be located? If APIS so should I convert these DTOs back to an entity when calling any service since again service in CORE can not see DTOs? If we can put DTOs in CORE then should not that violate single responsibility pattern?
Second problem should I create a dto for each endpoint as a parameter
ex: addUser(AddUserDto dto)so that the endpoint contract contains specific fields? What about complex DTO that contains custom entities data?