@@ -87,7 +87,7 @@ public interface UserControllerDocs {
8787 ),
8888 @ ApiResponse (
8989 responseCode = "401" ,
90- description = "인증 실패 (Access Token 문제 )" ,
90+ description = "인증 실패 (토큰 없음/잘못됨/만료 )" ,
9191 content = @ Content (
9292 mediaType = "application/json" ,
9393 examples = {
@@ -99,7 +99,7 @@ public interface UserControllerDocs {
9999 "data": null
100100 }
101101 """ ),
102- @ ExampleObject (name = "유효하지 않은 토큰" , value = """
102+ @ ExampleObject (name = "잘못된 토큰" , value = """
103103 {
104104 "success": false,
105105 "code": "AUTH_002",
@@ -303,4 +303,123 @@ ResponseEntity<RsData<UserDetailResponse>> updateMyProfile(
303303 @ AuthenticationPrincipal CustomUserDetails user ,
304304 @ Valid @ RequestBody UpdateUserProfileRequest request
305305 );
306+
307+ @ Operation (
308+ summary = "내 계정 삭제" ,
309+ description = "로그인한 사용자의 계정을 탈퇴 처리합니다. " +
310+ "탈퇴 시 사용자 상태는 DELETED로 변경되며, 프로필 정보는 마스킹 처리됩니다."
311+ )
312+ @ ApiResponses ({
313+ @ ApiResponse (
314+ responseCode = "200" ,
315+ description = "회원 탈퇴 성공" ,
316+ content = @ Content (
317+ mediaType = "application/json" ,
318+ examples = @ ExampleObject (value = """
319+ {
320+ "success": true,
321+ "code": "SUCCESS_200",
322+ "message": "회원 탈퇴가 완료되었습니다.",
323+ "data": null
324+ }
325+ """ )
326+ )
327+ ),
328+ @ ApiResponse (
329+ responseCode = "403" ,
330+ description = "정지된 계정" ,
331+ content = @ Content (
332+ mediaType = "application/json" ,
333+ examples = @ ExampleObject (value = """
334+ {
335+ "success": false,
336+ "code": "USER_008",
337+ "message": "정지된 계정입니다. 관리자에게 문의하세요.",
338+ "data": null
339+ }
340+ """ )
341+ )
342+ ),
343+ @ ApiResponse (
344+ responseCode = "410" ,
345+ description = "탈퇴한 계정" ,
346+ content = @ Content (
347+ mediaType = "application/json" ,
348+ examples = @ ExampleObject (value = """
349+ {
350+ "success": false,
351+ "code": "USER_009",
352+ "message": "탈퇴한 계정입니다.",
353+ "data": null
354+ }
355+ """ )
356+ )
357+ ),
358+ @ ApiResponse (
359+ responseCode = "401" ,
360+ description = "인증 실패 (토큰 없음/잘못됨/만료)" ,
361+ content = @ Content (
362+ mediaType = "application/json" ,
363+ examples = {
364+ @ ExampleObject (name = "토큰 없음" , value = """
365+ {
366+ "success": false,
367+ "code": "AUTH_001",
368+ "message": "인증이 필요합니다.",
369+ "data": null
370+ }
371+ """ ),
372+ @ ExampleObject (name = "잘못된 토큰" , value = """
373+ {
374+ "success": false,
375+ "code": "AUTH_002",
376+ "message": "유효하지 않은 액세스 토큰입니다.",
377+ "data": null
378+ }
379+ """ ),
380+ @ ExampleObject (name = "만료된 토큰" , value = """
381+ {
382+ "success": false,
383+ "code": "AUTH_004",
384+ "message": "만료된 액세스 토큰입니다.",
385+ "data": null
386+ }
387+ """ )
388+ }
389+ )
390+ ),
391+ @ ApiResponse (
392+ responseCode = "404" ,
393+ description = "존재하지 않는 사용자" ,
394+ content = @ Content (
395+ mediaType = "application/json" ,
396+ examples = @ ExampleObject (value = """
397+ {
398+ "success": false,
399+ "code": "USER_001",
400+ "message": "존재하지 않는 사용자입니다.",
401+ "data": null
402+ }
403+ """ )
404+ )
405+ ),
406+ @ ApiResponse (
407+ responseCode = "500" ,
408+ description = "서버 내부 오류" ,
409+ content = @ Content (
410+ mediaType = "application/json" ,
411+ examples = @ ExampleObject (value = """
412+ {
413+ "success": false,
414+ "code": "COMMON_500",
415+ "message": "서버 오류가 발생했습니다.",
416+ "data": null
417+ }
418+ """ )
419+ )
420+ )
421+ })
422+ ResponseEntity <RsData <Void >> deleteMyAccount (
423+ @ AuthenticationPrincipal CustomUserDetails user
424+ );
306425}
0 commit comments