-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3bc8229
commit e40a9db
Showing
20 changed files
with
414 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 56 additions & 0 deletions
56
week2/src/main/java/server/sopt/week2/controller/blog/ProductControllerSwagger.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
//package server.sopt.week2.controller.blog; | ||
// | ||
// | ||
//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.tags.Tag; | ||
//import org.springframework.web.bind.annotation.PathVariable; | ||
//import org.springframework.web.bind.annotation.RequestHeader; | ||
//import org.springframework.web.bind.annotation.RequestParam; | ||
// | ||
//@Tag(name = "상품", description = "상품 관련 API 입니다.") | ||
//public interface ProductControllerSwagger { | ||
// @Operation(summary = "세부 상품 조회 API") | ||
//// @ApiResponses(value = { | ||
// @ApiResponse(responseCode = "200", description = "세부 상품 조회에 성공했습니다."), | ||
// @ApiResponse(responseCode = "404", | ||
// description = "1. ID에 해당하는 사용자가 존재하지 않습니다.\n" + | ||
// "2. ID에 해당하는 상품이 존재하지 않습니다.", | ||
// content = @Content(schema = @Schema(implementation = CommonResponse.class))), | ||
// @ApiResponse(responseCode = "500", description = "서버 내부 오류입니다.", content = @Content(schema = @Schema(implementation = CommonResponse.class))) | ||
// }) | ||
// CommonResponse<DetailProductResponse> getDetailProduct( | ||
// @RequestHeader final Long memberId, | ||
// @PathVariable final Long productId | ||
// ); | ||
// | ||
// @Operation(summary = "발매정보 조회 API") | ||
// @ApiResponses(value = { | ||
// @ApiResponse(responseCode = "200", description = "발매 상품 정보 조회에 성공했습니다."), | ||
// @ApiResponse(responseCode = "500", description = "서버 내부 오류입니다.", content = @Content(schema = @Schema(implementation = CommonResponse.class))) | ||
// }) | ||
// CommonResponse<ReleaseProductResponse> getReleaseProduct( | ||
// @RequestHeader final Long memberId | ||
// ); | ||
// | ||
// @Operation(summary = "추천 상품 조회 API") | ||
// @ApiResponses(value = { | ||
// @ApiResponse(responseCode = "200", description = "추천 상품 조회에 성공했습니다."), | ||
// @ApiResponse(responseCode = "500", description = "서버 내부 오류입니다.", content = @Content(schema = @Schema(implementation = CommonResponse.class))) | ||
// }) | ||
// CommonResponse<RecommendProductResponse> getRecommendProduct( | ||
// @RequestHeader final Long memberId | ||
// ); | ||
// | ||
// @Operation(summary = "검색 상품 조회 API") | ||
// @ApiResponses(value = { | ||
// @ApiResponse(responseCode = "200", description = "검색 상품 조회에 성공했습니다."), | ||
// @ApiResponse(responseCode = "500", description = "서버 내부 오류입니다.", content = @Content(schema = @Schema(implementation = CommonResponse.class))) | ||
// }) | ||
// CommonResponse<SearchProductResponse> getFindProduct( | ||
// @RequestParam(value = "findName") String findName | ||
// ); | ||
//} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 56 additions & 0 deletions
56
week2/src/main/java/server/sopt/week2/controller/member/MemberControllerSwagger.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
//package server.sopt.week2.controller.member; | ||
// | ||
// | ||
//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.tags.Tag; | ||
//import org.springframework.web.bind.annotation.PathVariable; | ||
//import org.springframework.web.bind.annotation.RequestHeader; | ||
//import org.springframework.web.bind.annotation.RequestParam; | ||
// | ||
//@Tag(name = "멤버", description = "멤버 관련 API 입니다.") | ||
//public interface MemberControllerSwagger { | ||
// @Operation(summary = "세부 상품 조회 API") | ||
// @ApiResponses(value = { | ||
// @ApiResponse(responseCode = "200", description = "세부 상품 조회에 성공했습니다."), | ||
// @ApiResponse(responseCode = "404", | ||
// description = "1. ID에 해당하는 사용자가 존재하지 않습니다.\n" + | ||
// "2. ID에 해당하는 상품이 존재하지 않습니다.", | ||
// content = @Content(schema = @Schema(implementation = CommonResponse.class))), | ||
// @ApiResponse(responseCode = "500", description = "서버 내부 오류입니다.", content = @Content(schema = @Schema(implementation = CommonResponse.class))) | ||
// }) | ||
// CommonResponse<DetailProductResponse> getDetailProduct( | ||
// @aRequestHeader final Long memberId, | ||
// @PathVariable final Long productId | ||
// ); | ||
// | ||
// @Operation(summary = "발매정보 조회 API") | ||
// @ApiResponses(value = { | ||
// @ApiResponse(responseCode = "200", description = "발매 상품 정보 조회에 성공했습니다."), | ||
// @ApiResponse(responseCode = "500", description = "서버 내부 오류입니다.", content = @Content(schema = @Schema(implementation = CommonResponse.class))) | ||
// }) | ||
// CommonResponse<ReleaseProductResponse> getReleaseProduct( | ||
// @RequestHeader final Long memberId | ||
// ); | ||
// | ||
// @Operation(summary = "추천 상품 조회 API") | ||
// @ApiResponses(value = { | ||
// @ApiResponse(responseCode = "200", description = "추천 상품 조회에 성공했습니다."), | ||
// @ApiResponse(responseCode = "500", description = "서버 내부 오류입니다.", content = @Content(schema = @Schema(implementation = CommonResponse.class))) | ||
// }) | ||
// CommonResponse<RecommendProductResponse> getRecommendProduct( | ||
// @RequestHeader final Long memberId | ||
// ); | ||
// | ||
// @Operation(summary = "검색 상품 조회 API") | ||
// @ApiResponses(value = { | ||
// @ApiResponse(responseCode = "200", description = "검색 상품 조회에 성공했습니다."), | ||
// @ApiResponse(responseCode = "500", description = "서버 내부 오류입니다.", content = @Content(schema = @Schema(implementation = CommonResponse.class))) | ||
// }) | ||
// CommonResponse<SearchProductResponse> getFindProduct( | ||
// @RequestParam(value = "findName") String findName | ||
// ); | ||
//} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
week2/src/main/java/server/sopt/week2/controller/product/ProductController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
//package server.sopt.week2.controller.product; | ||
// | ||
// | ||
//import server.sopt.week2.controller.blog.ProductControllerSwagger; | ||
// | ||
//@RestController | ||
//@RequestMapping("/product") | ||
//@RequiredArgsConstructor | ||
//public class ProductController implements ProductControllerSwagger { | ||
// | ||
// private final ProductService productService; | ||
// | ||
// @Override | ||
// @GetMapping("/{productId}") | ||
// public CommonResponse<DetailProductResponse> getDetailProduct( | ||
// @RequestHeader final Long memberId, | ||
// @PathVariable final Long productId | ||
// ) { | ||
// return CommonResponse.success(SuccessMessage.GET_DETAIL_PRODUCT_SUCCESS, productService.findDetailProductById(memberId, productId)); | ||
// } | ||
// | ||
// @Override | ||
// @GetMapping("/release") | ||
// public CommonResponse<ReleaseProductResponse> getReleaseProduct( | ||
// @RequestHeader final Long memberId | ||
// ) { | ||
// return CommonResponse.success(SuccessMessage.GET_RELEASE_PRODUCT_SUCCESS, productService.findReleaseProduct(memberId)); | ||
// } | ||
// | ||
// @Override | ||
// @GetMapping("/recommend") | ||
// public CommonResponse<RecommendProductResponse> getRecommendProduct( | ||
// @RequestHeader final Long memberId | ||
// ) { | ||
// return CommonResponse.success(SuccessMessage.GET_RECOMMEND_PRODUCT_SUCCESS, productService.findRecommendProduct(memberId)); | ||
// } | ||
// | ||
// @Override | ||
// @GetMapping | ||
// public CommonResponse<SearchProductResponse> getFindProduct( | ||
// @RequestParam(value = "findName") String findName | ||
// ) { | ||
// return CommonResponse.success(SuccessMessage.GET_FIND_PRODUCT_BY_NAME, productService.findSearchProduct(findName)); | ||
// } | ||
//} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 3 additions & 2 deletions
5
week2/src/main/java/server/sopt/week2/dto/blog/BlogCreateRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
package server.sopt.week2.dto.blog; | ||
|
||
import jakarta.validation.constraints.Size; | ||
import org.springframework.web.multipart.MultipartFile; | ||
|
||
public record BlogCreateRequest( | ||
@Size(max = 10, message = "최대 글자 10글자") | ||
String title,String description | ||
) { | ||
String title, String description , MultipartFile image | ||
) { | ||
} |
Oops, something went wrong.