What are DTOs? What are Validators? DTOs: In NestJS, DTOs are typically defined as TypeScript classes or interfaces, and are used to define the shape of the data that is sent between different layers of an application. For example, when building a...
ajibadeabd.hashnode.dev4 min readI don't think you should use the dto pattern in 2023. It adds more boilerplate to your application.
You can usually get away with not using it, just using the entity directly + some parameters.
And when you see a need for it. Just name it CreateUserParams and don't call it CreateUserDTO, DTO has no meaning at all. Use a more semantic name schema.
abdullah ajibade
kordjs
Noted.