Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[LIME-119] 투표 통합 테스트 추가 #60

Merged
merged 18 commits into from
Mar 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public ResponseEntity<VoteGetByCursorResponse> getVotesByCursor(
@RequestParam final String hobby,
@RequestParam(required = false, name = "status") final String statusCondition,
@RequestParam(required = false, name = "sort") final String sortCondition,
@ModelAttribute @Valid final CursorRequest request
@ModelAttribute final CursorRequest request
) {
final CursorSummary<VoteSummary> cursorSummary = voteService.getVotesByCursor(
Hobby.from(hobby),
Expand All @@ -112,7 +112,7 @@ public ResponseEntity<VoteGetByCursorResponse> getVotesByCursor(
@GetMapping("/search")
public ResponseEntity<VoteGetByKeywordResponse> getVotesByKeyword(
@RequestParam final String keyword,
@ModelAttribute @Valid final CursorRequest request
@ModelAttribute final CursorRequest request
) {
final VoteGetByKeywordServiceResponse serviceResponse = voteService.getVotesByKeyword(keyword,
request.toParameters());
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
package com.programmers.lime.global.cursor;

import org.springdoc.core.annotations.ParameterObject;

import com.programmers.lime.common.cursor.CursorPageParameters;

import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.Parameter;

@ParameterObject
public record CursorRequest(
@Schema(description = "커서아이디, 첫 조회는 커서아이디 없는 요청입니다.", example = "2023110124000001")
@Parameter(description = "커서아이디, 첫 조회는 커서아이디 없는 요청입니다.", example = "2023110124000001")
String cursorId,

@Schema(description = "페이징 사이즈입니다", example = "10")
@Parameter(description = "페이징 사이즈입니다", example = "10")
Integer size
) {
public CursorPageParameters toParameters() {
Expand Down
Loading
Loading