diff --git a/src/main/java/econo/buddybridge/auth/controller/AuthController.java b/src/main/java/econo/buddybridge/auth/controller/AuthController.java index fbfb98f..8f2415d 100644 --- a/src/main/java/econo/buddybridge/auth/controller/AuthController.java +++ b/src/main/java/econo/buddybridge/auth/controller/AuthController.java @@ -11,6 +11,7 @@ import econo.buddybridge.utils.api.ApiResponse.CustomBody; import econo.buddybridge.utils.api.ApiResponseGenerator; import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.validation.Valid; import lombok.RequiredArgsConstructor; @@ -50,7 +51,7 @@ public ApiResponse> login( @Operation(summary = "Access Token, Refresh Token 재발급", description = "Refresh Token을 이용해 Access Token과 Refresh Token을 재발급합니다.") @PostMapping("/reissue") - public ApiResponse> reissue(@MemberToken String token) { + public ApiResponse> reissue(@Parameter(hidden = true) @MemberToken String token) { AuthToken authToken = authService.reissue(token); return ApiResponseGenerator.success(authToken, HttpStatus.OK); } diff --git a/src/main/java/econo/buddybridge/auth/controller/OAuthController.java b/src/main/java/econo/buddybridge/auth/controller/OAuthController.java index 4c2edc1..b03305e 100644 --- a/src/main/java/econo/buddybridge/auth/controller/OAuthController.java +++ b/src/main/java/econo/buddybridge/auth/controller/OAuthController.java @@ -12,6 +12,7 @@ import econo.buddybridge.utils.api.ApiResponse.CustomBody; import econo.buddybridge.utils.api.ApiResponseGenerator; import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpSession; @@ -93,7 +94,7 @@ public ApiResponse> loginWithToken(@RequestBody KakaoLogin // refresh token 재발급 @Operation(summary = "Access Token, Refresh Token 재발급", description = "Refresh Token을 이용하여 두 토큰 모두 재발급합니다.") @PostMapping("/reissue") - public ApiResponse> reissue(@MemberToken String token) { + public ApiResponse> reissue(@Parameter(hidden = true) @MemberToken String token) { AuthToken authToken = oAuthLoginService.reissue(token); return ApiResponseGenerator.success(authToken, HttpStatus.OK); } diff --git a/src/main/java/econo/buddybridge/common/exception/GlobalExceptionHandler.java b/src/main/java/econo/buddybridge/common/exception/GlobalExceptionHandler.java index fbb1521..12d7ff1 100644 --- a/src/main/java/econo/buddybridge/common/exception/GlobalExceptionHandler.java +++ b/src/main/java/econo/buddybridge/common/exception/GlobalExceptionHandler.java @@ -6,6 +6,7 @@ import org.springframework.http.HttpHeaders; import org.springframework.http.HttpStatusCode; import org.springframework.http.ResponseEntity; +import org.springframework.lang.NonNull; import org.springframework.web.bind.MethodArgumentNotValidException; import org.springframework.web.bind.annotation.ExceptionHandler; import org.springframework.web.bind.annotation.RestControllerAdvice; @@ -24,13 +25,13 @@ public ApiResponse> handleBusinessException(BusinessEx @Override protected ResponseEntity handleMethodArgumentNotValid( // 파라미터 유효성 검사 실패 시 발생하는 예외 처리 - MethodArgumentNotValidException ex, - HttpHeaders headers, - HttpStatusCode status, - WebRequest request + @NonNull MethodArgumentNotValidException ex, + @NonNull HttpHeaders headers, + @NonNull HttpStatusCode status, + @NonNull WebRequest request ) { // 공통 에러 코드로 처리 - // 세부 검증 오류는 ErrorResponse.invalidParams에 담아서 반환 + // 세부 검증 오류는 ErrorResponse#invalidParams에 담아서 반환 ErrorCode errorCode = CommonErrorCode.INVALID_INPUT_VALUE; return ResponseEntity.status(errorCode.getHttpStatus())