postman 응답 처럼 swagger 에서도 success 를 추가할수 없을까요?
해결됨
탄탄한 백엔드 NestJS, 기초부터 심화까지
export class ResultDto<T> { @ApiProperty() success: boolean; @ApiProperty() data: T } // ---- cats.controller.ts @ApiResponse({ type: ResultDto<ReadOnlyCatDto> }) @Post() async signUp(@Body() body: CatRequestDto) { return await this.catsService.signUp(body); } 이런 식으로 단순하고 typescript 의 제네릭으로 해봤는데 안되어 질문들입니다.
- swagger
- nodejs
- ApiResponse
- express
- mongodb
- NestJS
- ssr
박정근
댓글 1
좋아요 3
조회수 983





