Skip to content

Commit

Permalink
Merge branch 'main' into LIME-122-BE-
Browse files Browse the repository at this point in the history
  • Loading branch information
HandmadeCloud authored Mar 12, 2024
2 parents 74c410b + cafcfcc commit 3a031c5
Show file tree
Hide file tree
Showing 11 changed files with 718 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public record ReviewCreateRequest(
Integer rating,

@Schema(description = "리뷰 내용", example = "제가 원하는 스타일이에요")
@Size(max = 1000, message = "리뷰 내용은 최대 1000자 입니다.")
@Size(min = 10, max = 1000, message = "리뷰 내용은 최소 10자, 최대 1000자 입니다.")
String content
) {
public ReviewContent toReviewContent() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public record ReviewUpdateRequest(
Integer rating,

@Schema(description = "리뷰 내용", example = "사실 제가 원하는 않은 스타일이에요")
@Size(max = 1000, message = "리뷰 내용은 최대 1000자 입니다.")
@Size(min = 10, max = 1000, message = "리뷰 내용은 최소 10자, 최대 1000자 입니다.")
String content,

@Schema(description = "삭제할 아이템 url 목록", example = "[https://lime-bucket.kr.object.ncloudstorage.com/review-images/bc17405d-f035-443c-a03c-805146e1f1f1png, https://lime-bucket.kr.object.ncloudstorage.com/review-images/sfewff33-f035-443c-a03c-805146e1f1f1png]")
Expand Down
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

0 comments on commit 3a031c5

Please sign in to comment.