Appearance
Request and response DTOs
Applies to: **/*.dto.ts
Checklist
- Request DTOs MUST be concrete runtime classes with validation decorators for body, query, and path values; never ORM/Prisma entities or type-only aliases.
- Validation relies on
ValidationPipewithtransform: trueandwhitelist: true. - Response DTOs list their public fields explicitly, expose only fields that are useful and safe for consumers, and stay independent of persistence models. Use separate DTOs when representations have different semantics.
- Fields and constraints MUST be reflected in OpenAPI.
- Pagination query DTOs use
page(default 1) andpageSize(default 30, maximum 100) and reject invalid values.