Skip to content

Commit

Permalink
♻️ [Refactor] 게시판 글 목록 조회 API Swagger 명세
Browse files Browse the repository at this point in the history
  • Loading branch information
hzee97 committed Aug 10, 2024
1 parent 7ee5e2b commit 3d2170b
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import com.gamegoo.util.JWTUtil;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Parameters;
import io.swagger.v3.oas.annotations.tags.Tag;

import java.util.List;
Expand Down Expand Up @@ -114,14 +115,18 @@ public ApiResponse<String> delete(@PathVariable Long postId

@GetMapping("/list")
@Operation(summary = "게시판 글 목록 조회 API", description = "게시판에서 글 목록을 조회하는 API 입니다.")
@Parameter(name = "pageIdx", description = "조회할 페이지 번호를 입력해주세요. 페이지 당 20개의 게시물을 볼 수 있습니다.")
@Parameters({@Parameter(name = "pageIdx", description = "조회할 페이지 번호를 입력해주세요. 페이지 당 20개의 게시물을 볼 수 있습니다."),
@Parameter(name = "mode", description = "(선택) 게임 모드를 입력해주세요. < 빠른대전: 1, 솔로랭크: 2, 자유랭크: 3, 칼바람 나락: 4 >"),
@Parameter(name = "tier", description = "(선택) 티어를 선택해주세요."),
@Parameter(name = "mainPosition", description = "(선택) 포지션을 입력해주세요. < 전체: 0, 탑: 1, 정글: 2, 미드: 3, 바텀: 4, 서포터: 5 >"),
@Parameter(name = "mike", description = "(선택) 마이크 여부를 선택해주세요.")})
public ApiResponse<List<BoardResponse.boardListResponseDTO>> boardList(@RequestParam(defaultValue = "1") int pageIdx,
@RequestParam(required = false) Integer mode,
@RequestParam(required = false) Tier tier,
@RequestParam(required = false) Integer mainPosition,
@RequestParam(required = false) Boolean mike) {

// <포지션 정보> 전체: 0, 탑: 1, 정글: 2, 미드: 3, 바텀:4, 서포터:5
// <포지션 정보> 전체: 0, 탑: 1, 정글: 2, 미드: 3, 바텀: 4, 서포터: 5
if (mainPosition != null && mainPosition == 0) {
// 전체 포지션 선택 시 필터링에서 제외
mainPosition = null;
Expand Down

0 comments on commit 3d2170b

Please sign in to comment.