Skip to content

Commit

Permalink
feat: JsonProperty스테이크케이스로 변
Browse files Browse the repository at this point in the history
  • Loading branch information
HyeonsuLee committed Jul 23, 2024
1 parent d835694 commit 778bbab
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@ public record CreateReviewRequest(
public CreateReviewRequest(
@JsonProperty("rating") @NotNull @Min(1) @Max(5) Integer rating,
@JsonProperty("content") @NotBlank String content,
@JsonProperty("imageUrls") List<String> imageUrls,
@JsonProperty("menuNames") List<String> menuNames
@JsonProperty("image_urls") List<String> imageUrls,
@JsonProperty("menu_names") List<String> menuNames
) {
this.rating = rating;
this.content = content;
this.imageUrls = imageUrls != null ? imageUrls : new ArrayList<>();
this.menuNames = menuNames;
this.imageUrls = imageUrls == null? new ArrayList<>(): imageUrls;
this.menuNames = menuNames == null? new ArrayList<>(): menuNames;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@ public record ModifyReviewRequest(
public ModifyReviewRequest(
@JsonProperty("rating") @NotNull @Min(1) @Max(5) Integer rating,
@JsonProperty("content") @NotBlank String content,
@JsonProperty("imageUrls") List<String> imageUrls,
@JsonProperty("menuNames") List<String> menuNames
@JsonProperty("image_urls") List<String> imageUrls,
@JsonProperty("menu_names") List<String> menuNames
) {
this.rating = rating;
this.content = content;
this.imageUrls = imageUrls != null ? imageUrls : new ArrayList<>();
this.menuNames = menuNames;
this.imageUrls = imageUrls == null ? new ArrayList<>() : imageUrls;
this.menuNames = menuNames == null ? new ArrayList<>() : menuNames;
}
}

0 comments on commit 778bbab

Please sign in to comment.