JesseMattson / PurrgentCare

0 stars 0 forks source link

Feature: DTO pattern pets #69

Closed RandallKeur closed 3 months ago

RandallKeur commented 3 months ago

Title: Convert pet requests to be request objects, leverage DTOs, and mappers

Description: Start leveraging request objects, response objects, dtos, and mappers in order to create protection of data and eventual grouping of calls within the domain.

Technical Details: Typical flow should be the following: Request from client --> Controller (input: request body == request object) --> Service (input: request object) --> Mapper (input: request object, output: model object) --> Repository (input: id, model object, etc) --> Mapper (input: model object, output: response object) --> Service(output: response object) --> Controller(output: response object)

Acceptance Criteria:

Additional reading: https://www.baeldung.com/java-dto-pattern https://saranganjana.medium.com/data-transfer-object-dto-in-java-66c4f3075362

Sample PR being created to work through: https://github.com/JesseMattson/PurrgentCare/pull/60