Skip to content

Commit

Permalink
�docs: 애플 로그인 회원 삭제 API 문서화 (#955)
Browse files Browse the repository at this point in the history
* docs: 애플 로그인 회원 삭제 API 문서화

* docs: 애플 로그인 회원 삭제 API 문서화 수정

* docs: 애플 로그인 회원 삭제 API 에러 코드 추가
  • Loading branch information
mzeong authored Jan 19, 2025
1 parent 5ce46a0 commit 478c47f
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,11 @@ public ResponseEntity<Void> delete(@AuthMember Member member) {
return ResponseEntity.status(HttpStatus.NO_CONTENT)
.build();
}

@Override
@DeleteMapping("/v2/members")
public ResponseEntity<Void> deleteV2(@AuthMember Member member) {
return ResponseEntity.status(HttpStatus.NO_CONTENT)
.build();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.ody.member.domain.Member;
import com.ody.swagger.annotation.ErrorCode401;
import com.ody.swagger.annotation.ErrorCode403;
import com.ody.swagger.annotation.ErrorCode500;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
Expand All @@ -15,10 +16,19 @@
public interface MemberControllerSwagger {

@Operation(
summary = "회원 삭제",
summary = "회원 삭제 (deprecated)",
responses = @ApiResponse(responseCode = "204", description = "회원 삭제 성공")
)
@ErrorCode401
@ErrorCode500
ResponseEntity<Void> delete(@Parameter(hidden = true) Member member);

@Operation(
summary = "회원 삭제",
responses = @ApiResponse(responseCode = "204", description = "회원 삭제 성공")
)
@ErrorCode401
@ErrorCode403
@ErrorCode500
ResponseEntity<Void> deleteV2(@Parameter(hidden = true) Member member);
}
24 changes: 24 additions & 0 deletions backend/src/main/java/com/ody/swagger/annotation/ErrorCode403.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package com.ody.swagger.annotation;

import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import org.springframework.core.annotation.AliasFor;
import org.springframework.http.ProblemDetail;

@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
@ApiResponse(
responseCode = "403",
description = "권한 문제로 요청 거절",
content = @Content(schema = @Schema(implementation = ProblemDetail.class))
)
public @interface ErrorCode403 {

@AliasFor(annotation = ApiResponse.class, attribute = "description")
String description() default "권한 문제로 요청 거절";
}

0 comments on commit 478c47f

Please sign in to comment.