toss / nestjs-aop

A way to gracefully apply AOP to nestjs
MIT License
213 stars 24 forks source link

[BUG]: Controller Method 에 사용시 Swagger 데이터 손실 발생 #15

Closed icecreamparlor closed 1 year ago

icecreamparlor commented 1 year ago

Describe the bug

Nestjs Controller 에 LazyDecorator 사용시, Swagger 가 정상적으로 표시되지 않는 현상이 있습니다

Expected behavior

Nestjs Controller 에 데코레이터를 붙여도, Swagger 문서가 정상적으로 표시되어야 합니다.

To Reproduce

LazyDecorator 생성 후, Controller 메서드에 데코레이터를 답니다.

Possible Solution

Controller Class 의 reflect-metadata 가 손실되지 않도록 데코레이터 로직을 수정해야 할 것 같습니다.

Additional context

Controller 에 Decorator 사용시

(소스코드)

(스웨거)


Controller 에 Decorator 미사용시

(소스코드)

(스웨거)