From bbc069c8ad151fc48973948d500dc3c4f79490cd Mon Sep 17 00:00:00 2001 From: aiaiaiai1 Date: Tue, 5 Sep 2023 04:01:21 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20(#515)=20swagger=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../member/controller/MemberControllerDocs.java | 7 ++++++- .../domain/member/dto/response/RankingResponse.java | 12 ++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/backend/src/main/java/com/votogether/domain/member/controller/MemberControllerDocs.java b/backend/src/main/java/com/votogether/domain/member/controller/MemberControllerDocs.java index 373eb0162..7b5ffdaad 100644 --- a/backend/src/main/java/com/votogether/domain/member/controller/MemberControllerDocs.java +++ b/backend/src/main/java/com/votogether/domain/member/controller/MemberControllerDocs.java @@ -3,6 +3,7 @@ import com.votogether.domain.member.dto.request.MemberDetailRequest; import com.votogether.domain.member.dto.request.MemberNicknameUpdateRequest; import com.votogether.domain.member.dto.response.MemberInfoResponse; +import com.votogether.domain.member.dto.response.RankingResponse; import com.votogether.domain.member.entity.Member; import com.votogether.global.exception.ExceptionResponse; import io.swagger.v3.oas.annotations.Operation; @@ -34,6 +35,10 @@ ResponseEntity changeNickname( final Member member ); + @Operation(summary = "랭킹 조회", description = "회원 랭킹 정보를 조회한다.") + @ApiResponse(responseCode = "200", description = "회원 랭킹 정보 조회 성공") + ResponseEntity getRanking(final Member member); + @Operation(summary = "회원 상세 정보 변경", description = "회원의 상세 정보를 변경한다.") @ApiResponses({ @ApiResponse(responseCode = "200", description = "회원 상세 정보 변경 성공"), @@ -48,7 +53,7 @@ ResponseEntity updateDetails( final Member member ); - @Operation(summary = "회원 탈퇴", description = "회원 ㄷ탈퇴한다.") + @Operation(summary = "회원 탈퇴", description = "회원 탈퇴한다.") @ApiResponse(responseCode = "200", description = "회원 탈퇴 성공") ResponseEntity deleteMember(final Member member); diff --git a/backend/src/main/java/com/votogether/domain/member/dto/response/RankingResponse.java b/backend/src/main/java/com/votogether/domain/member/dto/response/RankingResponse.java index 40bd2b795..66a6cbc14 100644 --- a/backend/src/main/java/com/votogether/domain/member/dto/response/RankingResponse.java +++ b/backend/src/main/java/com/votogether/domain/member/dto/response/RankingResponse.java @@ -1,10 +1,22 @@ package com.votogether.domain.member.dto.response; +import io.swagger.v3.oas.annotations.media.Schema; + +@Schema(description = "랭킹 정보 응답") public record RankingResponse( + @Schema(description = "랭킹", example = "2") int ranking, + + @Schema(description = "닉네임", example = "유저") String nickname, + + @Schema(description = "게시글 수", example = "5") int postCount, + + @Schema(description = "투표 수", example = "6") int voteCount, + + @Schema(description = "점수", example = "31") int score ) { }