Skip to content

Commit

Permalink
add: error cases for swagger
Browse files Browse the repository at this point in the history
  • Loading branch information
Seokyeong237 committed Feb 13, 2024
1 parent 1a166cf commit 2a01b36
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
1 change: 0 additions & 1 deletion src/main/java/com/fullcar/core/response/ErrorCode.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ public enum ErrorCode {
INVALID_FORM_STATE(BAD_REQUEST, "유효하지 않은 신청서 상태입니다."),
EXISTED_CODE_IN_MAIL(BAD_REQUEST, "이미 인증번호를 보냈습니다."),
NOT_MATCHED_CODE(BAD_REQUEST, "인증번호가 일치하지 않습니다."),
INVALID_SOCIAL_TYPE(BAD_REQUEST, "유효하지 않은 소셜 로그인 타입 입니다."),

/* 401 UNAUTHORIZED */
UNAUTHORIZED_KAKAO_TOKEN(UNAUTHORIZED, "유효하지 않은 카카오 토큰"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,6 @@ public void withdrawMember(Member member) throws IOException {
else if (member.getSocialType() == SocialType.KAKAO) {
kakaoAuthService.revoke(member);
}
else {
throw new CustomException(ErrorCode.INVALID_SOCIAL_TYPE);
}

carService.deleteCar(member.getCarId());
mailService.deleteMail(member.getId());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public class AuthController {
@ApiResponses(value = {
@io.swagger.v3.oas.annotations.responses.ApiResponse(responseCode = "200", description = "애플 소셜 로그인 성공"),
@io.swagger.v3.oas.annotations.responses.ApiResponse(responseCode = "400", description = "애플 공개키 생성 중 문제 발생", content = @Content),
@io.swagger.v3.oas.annotations.responses.ApiResponse(responseCode = "401", description = "애플 refresh Token 생성 중 문제 발생", content = @Content),
@io.swagger.v3.oas.annotations.responses.ApiResponse(responseCode = "500", description = "서버 내부 오류", content = @Content)
})
@PostMapping("/login/apple")
Expand Down Expand Up @@ -88,6 +89,7 @@ public ApiResponse<Object> socialLogout(@CurrentMember Member member) {
@Operation(summary = "회원 탈퇴 API")
@ApiResponses({
@io.swagger.v3.oas.annotations.responses.ApiResponse(responseCode = "200", description = "탈퇴 성공"),
@io.swagger.v3.oas.annotations.responses.ApiResponse(responseCode = "401", description = "이미 탈퇴 처리되었거나 유효하지 않은 카카오 유저입니다.", content = @Content),
@io.swagger.v3.oas.annotations.responses.ApiResponse(responseCode = "500", description = "서버 내부 오류", content = @Content)
})
@DeleteMapping()
Expand Down

0 comments on commit 2a01b36

Please sign in to comment.