Skip to content

Commit

Permalink
Merge pull request #44 from tukcomCD2024/fix/#41_RM_Anotation
Browse files Browse the repository at this point in the history
refact : DTO, API 필요없는 어노테이션 삭제
  • Loading branch information
seokho-1116 authored Jan 19, 2024
2 parents e61518f + 99301f2 commit efff35c
Show file tree
Hide file tree
Showing 54 changed files with 34 additions and 323 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package site.timecapsulearchive.core.domain.auth.api;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.responses.ApiResponses;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
Expand All @@ -26,11 +24,7 @@ public interface AuthApi {
@ApiResponses(value = {
@ApiResponse(
responseCode = "200",
description = "ok",
content = @Content(
mediaType = "application/json",
schema = @Schema(implementation = OAuthUrlResponse.class)
)
description = "ok"
)
})
@GetMapping(
Expand All @@ -48,11 +42,7 @@ public interface AuthApi {
@ApiResponses(value = {
@ApiResponse(
responseCode = "200",
description = "ok",
content = @Content(
mediaType = "application/json",
schema = @Schema(implementation = OAuthUrlResponse.class)
)
description = "ok"
)
})
@GetMapping(
Expand All @@ -69,11 +59,7 @@ public interface AuthApi {
@ApiResponses(value = {
@ApiResponse(
responseCode = "200",
description = "ok",
content = @Content(
mediaType = "application/json",
schema = @Schema(implementation = TemporaryTokenResponse.class)
)
description = "ok"
)
})
@GetMapping(
Expand All @@ -91,11 +77,7 @@ public interface AuthApi {
@ApiResponses(value = {
@ApiResponse(
responseCode = "200",
description = "ok",
content = @Content(
mediaType = "application/json",
schema = @Schema(implementation = TemporaryTokenResponse.class)
)
description = "ok"
)
})
@GetMapping(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
package site.timecapsulearchive.core.domain.auth.dto.request;

import io.swagger.v3.oas.annotations.media.Schema;
import org.springframework.validation.annotation.Validated;

@Schema(description = "인증 번호로 인증 요청")
@Validated
public record VerificationMessageValidRequest(

@Schema(description = "인증 번호")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,19 @@
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.enums.ParameterIn;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.responses.ApiResponses;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import jakarta.validation.Valid;
import jakarta.validation.constraints.NotNull;
import org.springframework.http.ResponseEntity;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import site.timecapsulearchive.core.domain.capsule.dto.response.ImagesPageResponse;
import site.timecapsulearchive.core.domain.capsule.dto.response.MyCapsulePageResponse;
import site.timecapsulearchive.core.domain.capsule.dto.response.NearbyCapsulePageResponse;

@Validated
public interface CapsuleApi {

@Operation(
Expand All @@ -30,11 +27,7 @@ public interface CapsuleApi {
@ApiResponses(value = {
@ApiResponse(
responseCode = "200",
description = "처리 완료",
content = @Content(
mediaType = "application/json",
schema = @Schema(implementation = MyCapsulePageResponse.class)
)
description = "처리 완료"
)
})
@GetMapping(
Expand All @@ -59,11 +52,7 @@ ResponseEntity<MyCapsulePageResponse> findCapsulesByMemberId(
@ApiResponses(value = {
@ApiResponse(
responseCode = "200",
description = "처리 완료",
content = @Content(
mediaType = "application/json",
schema = @Schema(implementation = ImagesPageResponse.class)
)
description = "처리 완료"
)
})
@GetMapping(
Expand All @@ -88,11 +77,7 @@ ResponseEntity<ImagesPageResponse> findImages(
@ApiResponses(value = {
@ApiResponse(
responseCode = "200",
description = "처리 완료",
content = @Content(
mediaType = "application/json",
schema = @Schema(implementation = NearbyCapsulePageResponse.class)
)
description = "처리 완료"
)
})
@GetMapping(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,13 @@
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.enums.ParameterIn;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.responses.ApiResponses;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import jakarta.validation.Valid;
import jakarta.validation.constraints.NotNull;
import org.springframework.http.ResponseEntity;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.PatchMapping;
Expand All @@ -25,7 +23,6 @@
import site.timecapsulearchive.core.domain.capsule.dto.group_c.response.GroupCapsuleSummaryResponse;


@Validated
public interface GroupCapsuleApi {

@Operation(
Expand All @@ -37,11 +34,7 @@ public interface GroupCapsuleApi {
@ApiResponses(value = {
@ApiResponse(
responseCode = "202",
description = "처리 시작",
content = @Content(
mediaType = "application/json",
schema = @Schema(implementation = GroupCapsuleSummaryResponse.class)
)
description = "처리 시작"
)
})
@PostMapping(
Expand All @@ -64,11 +57,7 @@ ResponseEntity<GroupCapsuleSummaryResponse> createGroupCapsule(
@ApiResponses(value = {
@ApiResponse(
responseCode = "200",
description = "처리 완료",
content = @Content(
mediaType = "application/json",
schema = @Schema(implementation = GroupCapsuleDetailResponse.class)
)
description = "처리 완료"
)
})
@GetMapping(
Expand All @@ -92,11 +81,7 @@ ResponseEntity<GroupCapsuleDetailResponse> findGroupCapsuleByIdAndGroupId(
@ApiResponses(value = {
@ApiResponse(
responseCode = "200",
description = "처리 완료",
content = @Content(
mediaType = "application/json",
schema = @Schema(implementation = GroupCapsulePageResponse.class)
)
description = "처리 완료"
)
})
@GetMapping(
Expand All @@ -123,11 +108,7 @@ ResponseEntity<GroupCapsulePageResponse> getGroupCapsules(
@ApiResponses(value = {
@ApiResponse(
responseCode = "200",
description = "처리 완료",
content = @Content(
mediaType = "application/json",
schema = @Schema(implementation = GroupCapsuleSummaryResponse.class)
)
description = "처리 완료"
)
})
@PatchMapping(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,13 @@
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.enums.ParameterIn;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.responses.ApiResponses;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import jakarta.validation.Valid;
import jakarta.validation.constraints.NotNull;
import org.springframework.http.ResponseEntity;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.PatchMapping;
Expand All @@ -24,7 +22,6 @@
import site.timecapsulearchive.core.domain.capsule.dto.public_c.response.PublicCapsulePageResponse;
import site.timecapsulearchive.core.domain.capsule.dto.public_c.response.PublicCapsuleSummaryResponse;

@Validated
public interface PublicCapsuleApi {

@Operation(
Expand All @@ -36,11 +33,7 @@ public interface PublicCapsuleApi {
@ApiResponses(value = {
@ApiResponse(
responseCode = "202",
description = "처리 시작",
content = @Content(
mediaType = "application/json",
schema = @Schema(implementation = PublicCapsuleSummaryResponse.class)
)
description = "처리 시작"
)
})
@PostMapping(
Expand All @@ -60,11 +53,7 @@ ResponseEntity<PublicCapsuleSummaryResponse> createPublicCapsule(
@ApiResponses(value = {
@ApiResponse(
responseCode = "200",
description = "ok",
content = @Content(
mediaType = "application/json",
schema = @Schema(implementation = PublicCapsuleDetailResponse.class)
)
description = "ok"
)
})
@GetMapping(
Expand All @@ -85,11 +74,7 @@ ResponseEntity<PublicCapsuleDetailResponse> findPublicCapsuleById(
@ApiResponses(value = {
@ApiResponse(
responseCode = "200",
description = "ok",
content = @Content(
mediaType = "application/json",
schema = @Schema(implementation = PublicCapsulePageResponse.class)
)
description = "ok"
)
})
@GetMapping(
Expand All @@ -113,11 +98,7 @@ ResponseEntity<PublicCapsulePageResponse> getPublicCapsules(
@ApiResponses(value = {
@ApiResponse(
responseCode = "200",
description = "처리 완료",
content = @Content(
mediaType = "application/json",
schema = @Schema(implementation = PublicCapsuleSummaryResponse.class)
)
description = "처리 완료"
)
})
@PatchMapping(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,13 @@
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.enums.ParameterIn;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.responses.ApiResponses;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import jakarta.validation.Valid;
import jakarta.validation.constraints.NotNull;
import org.springframework.http.ResponseEntity;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.PatchMapping;
Expand All @@ -23,7 +21,6 @@
import site.timecapsulearchive.core.domain.capsule.dto.secret_c.response.SecretCapsulePageResponse;
import site.timecapsulearchive.core.domain.capsule.dto.secret_c.response.SecretCapsuleSummaryResponse;

@Validated
public interface SecretCapsuleApi {

@Operation(
Expand All @@ -35,11 +32,7 @@ public interface SecretCapsuleApi {
@ApiResponses(value = {
@ApiResponse(
responseCode = "202",
description = "처리 시작",
content = @Content(
mediaType = "application/json",
schema = @Schema(implementation = SecretCapsuleSummaryResponse.class)
)
description = "처리 시작"
)
})
@PostMapping(
Expand All @@ -59,11 +52,7 @@ ResponseEntity<SecretCapsuleSummaryResponse> createSecretCapsule(
@ApiResponses(value = {
@ApiResponse(
responseCode = "200",
description = "ok",
content = @Content(
mediaType = "application/json",
schema = @Schema(implementation = SecretCapsuleDetailResponse.class)
)
description = "ok"
)
})
@GetMapping(
Expand All @@ -84,11 +73,7 @@ ResponseEntity<SecretCapsuleDetailResponse> findSecretCapsuleById(
@ApiResponses(value = {
@ApiResponse(
responseCode = "200",
description = "ok",
content = @Content(
mediaType = "application/json",
schema = @Schema(implementation = SecretCapsulePageResponse.class)
)
description = "ok"
)
})
@GetMapping(
Expand All @@ -112,11 +97,7 @@ ResponseEntity<SecretCapsulePageResponse> getSecretCapsules(
@ApiResponses(value = {
@ApiResponse(
responseCode = "200",
description = "처리 완료",
content = @Content(
mediaType = "application/json",
schema = @Schema(implementation = SecretCapsuleSummaryResponse.class)
)
description = "처리 완료"
)
})
@PatchMapping(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
package site.timecapsulearchive.core.domain.capsule.dto.group_c.reqeust;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.Valid;
import java.time.ZonedDateTime;
import java.util.List;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.multipart.MultipartFile;

@Schema(description = "그룹 캡슐 생성 포맷")
@Validated
public record GroupCapsuleCreateRequest(

@Schema(description = "미디어들(이미지, 비디오)")
@Valid
List<MultipartFile> media,

@Schema(description = "캡슐 스킨 아이디")
Expand Down
Loading

0 comments on commit efff35c

Please sign in to comment.