Skip to content

Commit

Permalink
Merge pull request #105 from mash-up-kr/hotfix/docs
Browse files Browse the repository at this point in the history
hotfix: Validation Annotation �Sync
  • Loading branch information
K-Diger authored Jul 25, 2024
2 parents 70e75f0 + 6627a91 commit a99c22f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class RoomApi(
@ResponseStatus(HttpStatus.CREATED)
@PostMapping
override fun create(
@Valid @RequestBody request: RoomSaveRequestForm,
@Valid @NotNull @RequestBody request: RoomSaveRequestForm,
): ResponseForm<SaveRoomResponse> {
return ResponseForm(
data = roomUseCase.create(request),
Expand All @@ -41,7 +41,7 @@ class RoomApi(
@ResponseStatus(HttpStatus.OK)
@PutMapping
override fun modifyInformation(
@Valid @RequestBody request: RoomUpdateRequestForm,
@Valid @NotNull @RequestBody request: RoomUpdateRequestForm,
): ResponseForm<Unit> {
roomUseCase.modify(request)
return ResponseForm.EMPTY_RESPONSE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import com.piikii.application.port.input.dto.request.RegisterSchedulesRequest
import com.piikii.application.port.input.dto.response.SchedulesResponse
import com.piikii.input.http.controller.docs.ScheduleApiDocs
import com.piikii.input.http.controller.dto.ResponseForm
import jakarta.validation.Valid
import jakarta.validation.constraints.NotNull
import org.springframework.http.HttpStatus
import org.springframework.validation.annotation.Validated
Expand All @@ -27,7 +28,7 @@ class ScheduleApi(
@PutMapping
override fun registerSchedules(
@NotNull @PathVariable roomUid: UUID,
@RequestBody request: RegisterSchedulesRequest,
@Valid @NotNull @RequestBody request: RegisterSchedulesRequest,
): ResponseForm<Unit> {
scheduleUseCase.registerSchedules(roomUid, request)
return ResponseForm.EMPTY_RESPONSE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class VoteApi(
@PatchMapping("/deadline")
override fun changeVoteDeadline(
@NotNull @PathVariable roomUid: UUID,
@Valid @RequestBody request: VoteDeadlineSetRequest,
@Valid @NotNull @RequestBody request: VoteDeadlineSetRequest,
): ResponseForm<Unit> {
roomUseCase.changeVoteDeadline(roomUid, request.password, request.voteDeadline)
return ResponseForm.EMPTY_RESPONSE
Expand All @@ -52,7 +52,7 @@ class VoteApi(
@PostMapping
override fun vote(
@NotNull @PathVariable roomUid: UUID,
@Valid @RequestBody voteSaveRequest: VoteSaveRequest,
@Valid @NotNull @RequestBody voteSaveRequest: VoteSaveRequest,
): ResponseForm<Unit> {
voteUseCase.vote(roomUid, voteSaveRequest.toDomains())
return ResponseForm.EMPTY_RESPONSE
Expand Down

0 comments on commit a99c22f

Please sign in to comment.