Skip to content

Commit bb01856

Browse files
committed
Docs: Swagger 문서 작성
1 parent 7551941 commit bb01856

File tree

1 file changed

+86
-0
lines changed

1 file changed

+86
-0
lines changed

src/main/java/com/back/domain/user/controller/AuthControllerDocs.java

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -833,4 +833,90 @@ ResponseEntity<RsData<Void>> recoverUsername(
833833
ResponseEntity<RsData<Void>> recoverPassword(
834834
@Valid @RequestBody SendEmailRequest request
835835
);
836+
837+
@Operation(
838+
summary = "비밀번호 재설정",
839+
description = "비밀번호 재설정 토큰과 새로운 비밀번호를 입력받아 계정 비밀번호를 변경합니다. 토큰은 1시간 동안만 유효합니다."
840+
)
841+
@ApiResponses({
842+
@ApiResponse(
843+
responseCode = "200",
844+
description = "비밀번호 재설정 성공",
845+
content = @Content(
846+
mediaType = "application/json",
847+
examples = @ExampleObject(value = """
848+
{
849+
"success": true,
850+
"code": "SUCCESS_200",
851+
"message": "비밀번호가 성공적으로 재설정되었습니다.",
852+
"data": null
853+
}
854+
""")
855+
)
856+
),
857+
@ApiResponse(
858+
responseCode = "400",
859+
description = "잘못된 요청 (필드 누락, 비밀번호 정책 위반)",
860+
content = @Content(
861+
mediaType = "application/json",
862+
examples = @ExampleObject(value = """
863+
{
864+
"success": false,
865+
"code": "COMMON_400",
866+
"message": "잘못된 요청입니다.",
867+
"data": null
868+
}
869+
""")
870+
)
871+
),
872+
@ApiResponse(
873+
responseCode = "401",
874+
description = "유효하지 않은 비밀번호 재설정 토큰",
875+
content = @Content(
876+
mediaType = "application/json",
877+
examples = @ExampleObject(value = """
878+
{
879+
"success": false,
880+
"code": "TOKEN_003",
881+
"message": "유효하지 않은 비밀번호 재설정 토큰입니다.",
882+
"data": null
883+
}
884+
""")
885+
)
886+
),
887+
@ApiResponse(
888+
responseCode = "404",
889+
description = "존재하지 않는 사용자",
890+
content = @Content(
891+
mediaType = "application/json",
892+
examples = @ExampleObject(value = """
893+
{
894+
"success": false,
895+
"code": "USER_001",
896+
"message": "존재하지 않는 사용자입니다.",
897+
"data": null
898+
}
899+
""")
900+
)
901+
),
902+
@ApiResponse(
903+
responseCode = "500",
904+
description = "서버 내부 오류",
905+
content = @Content(
906+
mediaType = "application/json",
907+
examples = @ExampleObject(value = """
908+
{
909+
"success": false,
910+
"code": "COMMON_500",
911+
"message": "서버 오류가 발생했습니다.",
912+
"data": null
913+
}
914+
""")
915+
)
916+
)
917+
})
918+
@PostMapping("/password/reset")
919+
ResponseEntity<RsData<Void>> resetPassword(
920+
@Valid @RequestBody PasswordResetRequest request
921+
);
836922
}

0 commit comments

Comments
 (0)