JAVA에서 Swagger를 통해 API 문서를 구축해두었다.
컨트롤러에서 쉽게 User 정보를 꺼내쓰기 위해 Custom annoation을 만들었다.
@Target(ElementType.PARAMETER)
@Retention(RetentionPolicy.RUNTIME)
public @interface CurrentUser {
}
그러자 위와 같이 유저 정보 조회 API에 User object가 뜨는 현상이 발생하였다.
import io.swagger.v3.oas.annotations.Parameter;
@Parameter(hidden = true)
@Target(ElementType.PARAMETER)
@Retention(RetentionPolicy.RUNTIME)
public @interface CurrentUser {
}

이제 해당 현상이 사라짐을 확인할 수 있다.