Skip to content

Commit

Permalink
Merge pull request #89 from Team-Shaka/feature/88
Browse files Browse the repository at this point in the history
📝 DOCS: 트리하우스 생성 - 이름 관련 유효성 검사
  • Loading branch information
koojun99 authored Aug 5, 2024
2 parents d01dcc9 + e7b451a commit 6e2add3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.validation.Valid;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
Expand All @@ -27,7 +28,7 @@ public class TreehouseApi {
@PostMapping
@Operation(summary = "트리하우스 생성 🔑", description = "트리하우스를 생성합니다.")
public CommonResponse<TreehouseResponseDTO.createTreehouse> createTreehouse(
@RequestBody TreehouseRequestDTO.createTreehouse request
@Valid @RequestBody TreehouseRequestDTO.createTreehouse request
) {
return CommonResponse.onSuccess(treehouseService.createTreehouse(request));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.AccessLevel;
import lombok.Getter;
import lombok.NoArgsConstructor;
Expand All @@ -16,6 +17,7 @@ public static class createTreehouse{
@JsonProperty("treehouseName")
@Schema(description = "트리하우스 이름", example = "Team Shaka")
@NotBlank(message = "트리하우스 이름이 필요합니다.")
@Size(min = 2, max = 20, message = "트리하우스 이름은 최소 2자, 최대 20자여야 합니다.")
private String treehouseName;

@JsonProperty("treeholeName")
Expand Down

0 comments on commit 6e2add3

Please sign in to comment.