Skip to content

Commit

Permalink
feat: (#515) swagger 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
aiaiaiai1 committed Sep 4, 2023
1 parent dfa399c commit bbc069c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -34,6 +35,10 @@ ResponseEntity<Void> changeNickname(
final Member member
);

@Operation(summary = "랭킹 조회", description = "회원 랭킹 정보를 조회한다.")
@ApiResponse(responseCode = "200", description = "회원 랭킹 정보 조회 성공")
ResponseEntity<RankingResponse> getRanking(final Member member);

@Operation(summary = "회원 상세 정보 변경", description = "회원의 상세 정보를 변경한다.")
@ApiResponses({
@ApiResponse(responseCode = "200", description = "회원 상세 정보 변경 성공"),
Expand All @@ -48,7 +53,7 @@ ResponseEntity<Void> updateDetails(
final Member member
);

@Operation(summary = "회원 탈퇴", description = "회원 ㄷ탈퇴한다.")
@Operation(summary = "회원 탈퇴", description = "회원 탈퇴한다.")
@ApiResponse(responseCode = "200", description = "회원 탈퇴 성공")
ResponseEntity<Void> deleteMember(final Member member);

Expand Down
Original file line number Diff line number Diff line change
@@ -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
) {
}
Expand Down

0 comments on commit bbc069c

Please sign in to comment.