Notice
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 | 31 |
Tags
- 기후변화
- this
- OOP
- git pair
- NPM
- TypeScript
- 객체참조 #객체
- url #querystring
- lightsail nodejs apache
- jest
- ESLint
- 클로저
- #cloudfront #s3 #html 확장자 없애기
Archives
- Today
- Total
Hello World...
nest.js swagger 문서에서 특정 api 안 보이게 하기 본문
특정 api 메서드는 보이지 않게 하려고 한다.
이런 경우 @ApiExcludeEndpoint() 를 사용하면 된다.
import { Controller, Get } from '@nestjs/common';
import { ApiExcludeEndpoint } from '@nestjs/swagger';
import { AppService } from './app.service';
@Controller()
export class AppController {
constructor(private readonly appService: AppService) {}
@ApiExcludeEndpoint()
@Get()
getHello(): string {
return this.appService.getHello();
}
}
https://github.com/nestjs/swagger/issues/92
Feature Request: Turn off swagger for methods/controllers · Issue #92 · nestjs/swagger
I did not find how to turn off swagger for controllers/methods. It could be a good feature. If there is any way to turn off swagger, I will be grateful for explaining ho to do that.
github.com
'nest.js' 카테고리의 다른 글
swagger api 문서 페이지 접근시 아이디, 암호 인증 (0) | 2022.11.24 |
---|---|
nest.js "secretOrPrivateKey must have a value" error (0) | 2022.08.20 |
nest js dot env 환경에 따른 설정 (0) | 2022.08.20 |
Comments