Skip to content

Commit 6c1d623

Browse files
committed
Docs: Swagger 문서 작성
1 parent b605944 commit 6c1d623

File tree

1 file changed

+72
-0
lines changed

1 file changed

+72
-0
lines changed

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

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import jakarta.validation.Valid;
1414
import org.springframework.http.ResponseEntity;
1515
import org.springframework.web.bind.annotation.GetMapping;
16+
import org.springframework.web.bind.annotation.PostMapping;
1617
import org.springframework.web.bind.annotation.RequestBody;
1718
import org.springframework.web.bind.annotation.RequestParam;
1819

@@ -690,4 +691,75 @@ ResponseEntity<RsData<Map<String, String>>> refreshToken(
690691
HttpServletRequest request,
691692
HttpServletResponse response
692693
);
694+
695+
@Operation(
696+
summary = "아이디 찾기",
697+
description = "사용자가 이메일을 입력하면, 해당 이메일로 가입된 계정의 아이디(username)를 일부 마스킹 처리하여 이메일로 전송합니다."
698+
)
699+
@ApiResponses({
700+
@ApiResponse(
701+
responseCode = "200",
702+
description = "아이디 찾기 성공",
703+
content = @Content(
704+
mediaType = "application/json",
705+
examples = @ExampleObject(value = """
706+
{
707+
"success": true,
708+
"code": "SUCCESS_200",
709+
"message": "아이디를 이메일로 전송했습니다.",
710+
"data": null
711+
}
712+
""")
713+
)
714+
),
715+
@ApiResponse(
716+
responseCode = "404",
717+
description = "존재하지 않는 사용자",
718+
content = @Content(
719+
mediaType = "application/json",
720+
examples = @ExampleObject(value = """
721+
{
722+
"success": false,
723+
"code": "USER_001",
724+
"message": "존재하지 않는 사용자입니다.",
725+
"data": null
726+
}
727+
""")
728+
)
729+
),
730+
@ApiResponse(
731+
responseCode = "400",
732+
description = "잘못된 요청 (이메일 누락 등)",
733+
content = @Content(
734+
mediaType = "application/json",
735+
examples = @ExampleObject(value = """
736+
{
737+
"success": false,
738+
"code": "COMMON_400",
739+
"message": "잘못된 요청입니다.",
740+
"data": null
741+
}
742+
""")
743+
)
744+
),
745+
@ApiResponse(
746+
responseCode = "500",
747+
description = "서버 내부 오류",
748+
content = @Content(
749+
mediaType = "application/json",
750+
examples = @ExampleObject(value = """
751+
{
752+
"success": false,
753+
"code": "COMMON_500",
754+
"message": "서버 오류가 발생했습니다.",
755+
"data": null
756+
}
757+
""")
758+
)
759+
)
760+
})
761+
@PostMapping("/username/recover")
762+
ResponseEntity<RsData<Void>> recoverUsername(
763+
@Valid @RequestBody sendEmailRequest request
764+
);
693765
}

0 commit comments

Comments
 (0)