Coding task · NestJS course · Module 11: Swagger and OpenAPI

Response DTO with Type in Controller

Create a response DTO and use it in @ApiOkResponse decorators.

Task

Create SenatorResponseDto and CreateSenatorDto, then use them as the type in response decorators