Skip to content

Commit

Permalink
Merge branch 'develop' into feat/#133-bucket-detail-fe
Browse files Browse the repository at this point in the history
Change-Id: I0fb3dced24bbb6c92653ac1d2411c469dbc4b392
  • Loading branch information
leewooseong committed Feb 7, 2024
2 parents db2e812 + c36cad1 commit 84bf5e7
Show file tree
Hide file tree
Showing 72 changed files with 2,129 additions and 428 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@
import java.util.Arrays;
import java.util.List;

/**
* @author 404-not-foundl
* @since 2023-12-14
* @version spring security 6.1.5
* @version spring boot 3.1.6
* @version java 17
*/
@Configuration
@RequiredArgsConstructor
@EnableWebSecurity
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ public enum ExceptionType {
SELF_SUBSCRIPTION_ATTEMPTED(400, "์ž๊ธฐ ์ž์‹ ์„ ๊ตฌ๋…ํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค."),
ALREADY_WITHDRAWN_USER(409, "์ด๋ฏธ ํƒˆํ‡ดํ•œ ์‚ฌ์šฉ์ž์ž…๋‹ˆ๋‹ค."),

// oauth
OAUTH_AUTHORIZATION_CODE_INVALID(400,"์ธ๊ฐ€์ฝ”๋“œ๊ฐ€ ์œ ํšจํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค."),

// bucket
BUCKET_NOT_FOUND(404, "ํ•ด๋‹น ๋ฒ„ํ‚ท์„ ์ฐพ์„ ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค."),
BUCKET_NOT_VALID(400, "๋ฒ„ํ‚ท์ด ๋น„๊ณต๊ฐœ์ž…๋‹ˆ๋‹ค."),
Expand All @@ -46,7 +49,8 @@ public enum ExceptionType {
REVIEW_NOT_FOUND(404, "ํ•ด๋‹น ํ›„๊ธฐ๋ฅผ ์ฐพ์„ ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค."),
REVIEW_NOT_VALID(400, "ํ›„๊ธฐ๊ฐ€ ๋น„๊ณต๊ฐœ์ž…๋‹ˆ๋‹ค."),
IMAGE_NOT_FOUND(404, "ํ•ด๋‹น ์ด๋ฏธ์ง€๋ฅผ ์ฐพ์„ ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค."),
REVIEW_ALREADY_EXISTS(409, "ํ•ด๋‹น ๋ฒ„ํ‚ท์˜ ๋ฆฌ๋ทฐ๊ฐ€ ์ด๋ฏธ ์กด์žฌํ•ฉ๋‹ˆ๋‹ค."),
REVIEW_ALREADY_POSTED(409, "ํ•ด๋‹น ๋ฒ„ํ‚ท์˜ ํ›„๊ธฐ๊ฐ€ ์ด๋ฏธ ์กด์žฌํ•ฉ๋‹ˆ๋‹ค."),
TEMPORARY_REVIEW(400, "ํ•ด๋‹น ํ›„๊ธฐ๊ฐ€ ์ž„์‹œ์ €์žฅ ์ƒํƒœ์ž…๋‹ˆ๋‹ค."),

// comment
COMMENT_NOT_FOUND(404, "๋Œ“๊ธ€์„ ์ฐพ์„ ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค."),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@
import java.util.Objects;
import java.util.stream.Collectors;

/**
* @author 404-not-foundl
* @since 2023-12-14
* @version spring security 6.1.5
* @version spring boot 3.1.6
* @version java 17
*/
@Component
public class JwtAuthenticationFilter extends OncePerRequestFilter {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@
import java.security.Key;
import java.util.Date;

/**
* @author 404-not-foundl
* @since 2023-12-14
* @version spring security 6.1.5
* @version spring boot 3.1.6
* @version java 17
*/
@Component
@Slf4j
@RequiredArgsConstructor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

import java.io.IOException;

@Tag(name = "6. ์•Œ๋žŒ", description = "์•Œ๋žŒ๊ณผ ๊ด€๋ จ๋œ API๋“ค ์ž…๋‹ˆ๋‹ค")
@Tag(name = "7. ์•Œ๋žŒ", description = "์•Œ๋žŒ๊ณผ ๊ด€๋ จ๋œ API๋“ค ์ž…๋‹ˆ๋‹ค")
@RestController
@RequiredArgsConstructor
@RequestMapping("/alarm")
Expand Down Expand Up @@ -58,9 +58,9 @@ public SseEmitter subscribe(@AuthenticationPrincipal User user) {
}

@GetMapping("/count")
@Operation(summary = "์•Œ๋žŒ ๊ฐœ์ˆ˜ ๋ฐ˜ํ™˜", description = "์•ˆ ์ฝ์€ ์•Œ๋žŒ์˜ ๊ฐœ์ˆ˜๋ฅผ ๋ฐ˜ํ™˜ํ•ฉ๋‹ˆ๋‹ค")
@Operation(summary = "์•Œ๋žŒ ๊ฐœ์ˆ˜ ์กฐํšŒ", description = "์•ˆ ์ฝ์€ ์•Œ๋žŒ์˜ ๊ฐœ์ˆ˜๋ฅผ ๋ฐ˜ํ™˜ํ•ฉ๋‹ˆ๋‹ค")
@ApiResponses({
@ApiResponse(responseCode = "200", description = "๋ฒ„ํ‚ท ์ƒ์„ฑ ์„ฑ๊ณต",
@ApiResponse(responseCode = "200", description = "์กฐํšŒ ์„ฑ๊ณต",
content = @Content(schemaProperties = {
@SchemaProperty(name = "result", schema = @Schema(defaultValue = "ok", description = "์š”์ฒญ ์„ฑ๊ณต")),
@SchemaProperty(name = "alarmCount", schema = @Schema(type = "int", example = "5",description = "์•Œ๋žŒ ๊ฐœ์ˆ˜"))
Expand All @@ -71,9 +71,9 @@ public Response alarmCount(@AuthenticationPrincipal User user){
}

@GetMapping("/")
@Operation(summary = "์•Œ๋žŒ ๋ฆฌ์ŠคํŠธ ๋ฐ˜ํ™˜", description = "์•Œ๋žŒ ๋‚ด์—ญ์„ ๋ฐ˜ํ™˜ํ•ฉ๋‹ˆ๋‹ค")
@Operation(summary = "์•Œ๋žŒ ์กฐํšŒ", description = "์ „์ฒด ์•Œ๋žŒ ๋‚ด์—ญ์„ ๋ฐ˜ํ™˜ํ•ฉ๋‹ˆ๋‹ค")
@ApiResponses({
@ApiResponse(responseCode = "200", description = "๋ฒ„ํ‚ท ์ƒ์„ฑ ์„ฑ๊ณต",
@ApiResponse(responseCode = "200", description = "์กฐํšŒ ์„ฑ๊ณต",
content = @Content(schemaProperties = {
@SchemaProperty(name = "result", schema = @Schema(defaultValue = "ok", description = "์š”์ฒญ ์„ฑ๊ณต")),
@SchemaProperty(name = "alarm", schema = @Schema(implementation = AlarmResponseDto.class))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

@Tag(name = "2. ๋ฒ„ํ‚ท", description = "๋ฒ„ํ‚ท๊ณผ ๊ด€๋ จ๋œ API๋“ค ์ž…๋‹ˆ๋‹ค")
@Tag(name = "3. ๋ฒ„ํ‚ท", description = "๋ฒ„ํ‚ท๊ณผ ๊ด€๋ จ๋œ API๋“ค ์ž…๋‹ˆ๋‹ค")
@RestController
@RequiredArgsConstructor
@RequestMapping("/bucket")
Expand Down Expand Up @@ -53,7 +53,7 @@ public Response postBucket(@AuthenticationPrincipal User user, @Valid @RequestBo
@SchemaProperty(name = "bucketInfo", schema = @Schema(implementation = GetBucketResponseDto.class))
}))
})
@GetMapping("/info/{bucket}")
@GetMapping("/info/{bucketId}")
public Response getBucket(@AuthenticationPrincipal User user, @PathVariable("bucket") Long bucketId){
return new Response("bucketInfo", bucketService.getBucket(user, bucketId));
}
Expand All @@ -79,12 +79,12 @@ public Response updateBucket(@AuthenticationPrincipal User user, @Valid @Request
@SchemaProperty(name = "message", schema = @Schema(defaultValue = "์‚ญ์ œ๋ฅผ ์™„๋ฃŒํ•˜์˜€์Šต๋‹ˆ๋‹ค.", description = "์‚ญ์ œ ์„ฑ๊ณต ๋ฉ”์„ธ์ง€"))
}))
})
@DeleteMapping("/{bucket}")
@DeleteMapping("/{bucketId}")
public Response deleteBucket(@AuthenticationPrincipal User user, @PathVariable("bucket") Long bucket_id){
return new Response("message", bucketService.deleteBucket(user, bucket_id));
}

@PatchMapping("/{bucket}")
@PatchMapping("/{bucketId}")
@Operation(summary = "๋ฒ„ํ‚ท ๋‹ฌ์„ฑ์ผ ๋“ฑ๋ก", description = "์ฃผ์–ด์ง„ id์˜ ๋ฒ„ํ‚ท ๋‹ฌ์„ฑ์ผ์„ ๊ธˆ์ผ๋กœ ๋“ฑ๋กํ•ฉ๋‹ˆ๋‹ค.")
@ApiResponses({
@ApiResponse(responseCode = "200", description = "๋ฒ„ํ‚ท ๋‹ฌ์„ฑ์ผ ๋“ฑ๋ก ์„ฑ๊ณต",
Expand All @@ -110,7 +110,7 @@ public Response searchBucket(@RequestParam String word, Pageable pageable){
return new Response("bucketSearchList", bucketService.searchBuckets(word, pageable));
}

@PostMapping("/image/{bucket}")
@PostMapping("/image/{bucketId}")
@Operation(summary = "๋ฒ„ํ‚ท ์ด๋ฏธ์ง€ ๋“ฑ๋ก", description = "๋ฒ„ํ‚ท ์ด๋ฏธ์ง€๋ฅผ ๋“ฑ๋กํ•ฉ๋‹ˆ๋‹ค.")
@ApiResponses({
@ApiResponse(responseCode = "200", description = "์ด๋ฏธ์ง€ ์ €์žฅ ์„ฑ๊ณต",
Expand All @@ -126,7 +126,7 @@ public Response bucketImage(@AuthenticationPrincipal User user, @PathVariable("b
return new Response("bucketImageUrl", bucketService.bucketImage(user, bucketId, bucketImage));
}

@GetMapping("/reaction/{bucket}")
@GetMapping("/reaction/{bucketId}")
@Operation(summary = "๋ฒ„ํ‚ท ๋ฆฌ์•ก์…˜ ์กฐํšŒ", description = "๋ฒ„ํ‚ท์— ๋‹ฌ๋ฆฐ ๋ฆฌ์•ก์…˜์„ ๋ฐ˜ํ™˜ํ•ฉ๋‹ˆ๋‹ค.")
@ApiResponses({
@ApiResponse(responseCode = "200", description = "๋ฆฌ์•ก์…˜ ์กฐํšŒ ์„ฑ๊ณต",
Expand All @@ -140,7 +140,7 @@ public Response getBucketReaction(@AuthenticationPrincipal User user, @PathVaria
}

@PostMapping("/reaction/")
@Operation(summary = "ํ›„๊ธฐ ๋ฆฌ์•ก์…˜ ์ž‘์„ฑ", description = "ํ›„๊ธฐ์— ๋ฆฌ์•ก์…˜์„ ๋‹ต๋‹ˆ๋‹ค.")
@Operation(summary = "๋ฒ„ํ‚ท ๋ฆฌ์•ก์…˜ ์ž‘์„ฑ", description = "๋ฒ„ํ‚ท์— ๋ฆฌ์•ก์…˜์„ ๋‹ต๋‹ˆ๋‹ค.")
@ApiResponses({
@ApiResponse(responseCode = "200", description = "๋ฆฌ์•ก์…˜ ์ž‘์„ฑ ์„ฑ๊ณต",
content = @Content(schemaProperties = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import org.springframework.security.core.annotation.AuthenticationPrincipal;
import org.springframework.web.bind.annotation.*;

@Tag(name = "7. ๋ฒ„ํ‚ท ๋Œ“๊ธ€", description = "๋ฒ„ํ‚ท ํ•˜์œ„ ๋Œ“๊ธ€๊ณผ ๊ด€๋ จ๋œ API๋“ค ์ž…๋‹ˆ๋‹ค")
@Tag(name = "8. ๋ฒ„ํ‚ท ๋Œ“๊ธ€", description = "๋ฒ„ํ‚ท ํ•˜์œ„ ๋Œ“๊ธ€๊ณผ ๊ด€๋ จ๋œ API๋“ค ์ž…๋‹ˆ๋‹ค")
@RestController
@RequiredArgsConstructor
@RequestMapping("/comment/bucket")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import org.springframework.security.core.annotation.AuthenticationPrincipal;
import org.springframework.web.bind.annotation.*;

@Tag(name = "8. ํ›„๊ธฐ ๋Œ“๊ธ€", description = "ํ›„๊ธฐ ํ•˜์œ„ ๋Œ“๊ธ€๊ณผ ๊ด€๋ จ๋œ API๋“ค ์ž…๋‹ˆ๋‹ค")
@Tag(name = "9. ํ›„๊ธฐ ๋Œ“๊ธ€", description = "ํ›„๊ธฐ ํ•˜์œ„ ๋Œ“๊ธ€๊ณผ ๊ด€๋ จ๋œ API๋“ค ์ž…๋‹ˆ๋‹ค")
@RestController
@RequiredArgsConstructor
@RequestMapping("/comment/review")
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
package com.ggums.ggumtle.controller;

import com.ggums.ggumtle.common.response.Response;
import com.ggums.ggumtle.dto.request.OAuthJoinRequestDto;
import com.ggums.ggumtle.service.OAuth.GoogleService;
import com.ggums.ggumtle.service.OAuth.KakaoService;
import jakarta.servlet.http.HttpServletResponse;
import jakarta.validation.Valid;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;

@RestController
@RequiredArgsConstructor
@RequestMapping("/api/oauth")
public class OAuthController {

private final KakaoService kakaoService;
private final GoogleService googleService;

@GetMapping("/kakao/{authorizationCode}")
public Response kakaoLogin(HttpServletResponse response, @PathVariable String authorizationCode){
return new Response("login", kakaoService.kakaoLogin(response, authorizationCode));
}

@PostMapping("/kakao")
public Response kakaoJoin(@Valid @RequestBody OAuthJoinRequestDto requestDto){
return new Response("message", kakaoService.kakaoJoin(requestDto));
}

@GetMapping("/google/{authenticationCode}")
public Response googleLogin(HttpServletResponse response, @PathVariable String authenticationCode){
return new Response("login", googleService.googleLogin(response, authenticationCode));
}

@PostMapping("/google")
public Response googleJoin(@Valid @RequestBody OAuthJoinRequestDto requestDto){
return new Response("message", googleService.googleJoin(requestDto));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import com.ggums.ggumtle.dto.response.ReviewReactionResponseDto;
import com.ggums.ggumtle.dto.response.ReviewResponseDto;
import com.ggums.ggumtle.dto.response.ReviewSearchResponseDto;
import com.ggums.ggumtle.dto.response.ReviewBriefResponseDto;
import com.ggums.ggumtle.entity.User;
import com.ggums.ggumtle.service.ReviewService;
import io.swagger.v3.oas.annotations.Operation;
Expand All @@ -23,25 +24,25 @@
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

@Tag(name = "3. ํ›„๊ธฐ", description = "ํ›„๊ธฐ์™€ ๊ด€๋ จ๋œ API๋“ค ์ž…๋‹ˆ๋‹ค")
@Tag(name = "4. ํ›„๊ธฐ", description = "ํ›„๊ธฐ์™€ ๊ด€๋ จ๋œ API๋“ค ์ž…๋‹ˆ๋‹ค")
@RestController
@RequestMapping("/review")
@RequiredArgsConstructor
public class ReviewController {

private final ReviewService reviewService;

@PostMapping
@Operation(summary = "ํ›„๊ธฐ ์ƒ์„ฑ", description = "ํ•ด๋‹น ๋ฒ„ํ‚ท๊ณผ ์—ฐ๊ด€๋œ ํ›„๊ธฐ๋ฅผ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค.")
@GetMapping("/brief/{bucketId}")
@Operation(summary = "ํ›„๊ธฐ ๊ฐ„๋‹จ ์ •๋ณด ์กฐํšŒ", description = "์ฃผ์–ด์ง„ ๋ฒ„ํ‚ท id์˜ ์ž„์‹œ์ €์žฅํ•œ ํ›„๊ธฐ ์กด์žฌ ์—ฌ๋ถ€, ์กด์žฌํ•  ๊ฒฝ์šฐ ์ œ๋ชฉ๊ณผ ๋‚ด์šฉ์„ ๋ฐ˜ํ™˜ํ•ฉ๋‹ˆ๋‹ค.")
@ApiResponses({
@ApiResponse(responseCode = "200", description = "ํ›„๊ธฐ ์ƒ์„ฑ ์„ฑ๊ณต",
@ApiResponse(responseCode = "200", description = "ํ›„๊ธฐ ๊ฐ„๋‹จ ์ •๋ณด ์กฐํฌ ์„ฑ๊ณต",
content = @Content(schemaProperties = {
@SchemaProperty(name = "result", schema = @Schema(defaultValue = "ok", description = "์š”์ฒญ ์„ฑ๊ณต")),
@SchemaProperty(name = "reviewId", schema = @Schema(type = "int", example = "1",description = "์ƒ์„ฑ๋œ ํ›„๊ธฐ id"))
@SchemaProperty(name = "review", schema = @Schema(implementation = ReviewBriefResponseDto.class))
}))
})
public Response postReview(@AuthenticationPrincipal User user, @Valid @RequestBody PostReviewRequestDto requestDto) {
return new Response("reviewId", reviewService.postReview(user, requestDto));
public Response getReviewBrief(@AuthenticationPrincipal User user, @PathVariable Long bucketId) {
return new Response("reviewBrief", reviewService.getReviewBrief(user, bucketId));
}

@PostMapping("/image")
Expand All @@ -60,6 +61,20 @@ public Response postImage(@RequestParam final MultipartFile image) {
return new Response("imageUrl", reviewService.postImage(image));
}


@PostMapping
@Operation(summary = "ํ›„๊ธฐ ์ƒ์„ฑ", description = "ํ•ด๋‹น ๋ฒ„ํ‚ท๊ณผ ์—ฐ๊ด€๋œ ํ›„๊ธฐ๋ฅผ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค.")
@ApiResponses({
@ApiResponse(responseCode = "200", description = "ํ›„๊ธฐ ์ƒ์„ฑ ์„ฑ๊ณต",
content = @Content(schemaProperties = {
@SchemaProperty(name = "result", schema = @Schema(defaultValue = "ok", description = "์š”์ฒญ ์„ฑ๊ณต")),
@SchemaProperty(name = "reviewId", schema = @Schema(type = "int", example = "1",description = "์ƒ์„ฑ๋œ ํ›„๊ธฐ id"))
}))
})
public Response postReview(@AuthenticationPrincipal User user, @Valid @RequestBody PostReviewRequestDto requestDto) {
return new Response("reviewId", reviewService.postReview(user, requestDto));
}

@GetMapping("/{reviewId}")
@Operation(summary = "ํ›„๊ธฐ ์กฐํšŒ", description = "์ฃผ์–ด์ง„ id์˜ ํ›„๊ธฐ ์ƒ์„ธ ์ •๋ณด๋ฅผ ๋ฐ˜ํ™˜ํ•ฉ๋‹ˆ๋‹ค.")
@ApiResponses({
Expand All @@ -73,7 +88,7 @@ public Response getReview(@AuthenticationPrincipal User user, @PathVariable Long
return new Response("review", reviewService.getReview(user, reviewId));
}

@PutMapping("/{reviewId}")
@PutMapping()
@Operation(summary = "ํ›„๊ธฐ ์ˆ˜์ •", description = "์ฃผ์–ด์ง„ id์˜ ํ›„๊ธฐ๋ฅผ ์ˆ˜์ •ํ•ฉ๋‹ˆ๋‹ค.")
@ApiResponses({
@ApiResponse(responseCode = "200", description = "ํ›„๊ธฐ ์ˆ˜์ • ์„ฑ๊ณต",
Expand All @@ -82,8 +97,8 @@ public Response getReview(@AuthenticationPrincipal User user, @PathVariable Long
@SchemaProperty(name = "reviewId", schema = @Schema(type = "int", example = "1",description = "์ˆ˜์ •๋œ ํ›„๊ธฐ id"))
}))
})
public Response putReview(@AuthenticationPrincipal User user, @PathVariable Long reviewId, @Valid @RequestBody PutReviewRequestDto requestDto) {
return new Response("reviewId", reviewService.putReview(user, reviewId, requestDto));
public Response putReview(@AuthenticationPrincipal User user, @Valid @RequestBody PutReviewRequestDto requestDto) {
return new Response("reviewId", reviewService.putReview(user, requestDto));
}

@DeleteMapping("/{reviewId}")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.ggums.ggumtle.common.response.Response;
import com.ggums.ggumtle.service.UserApiService;
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.media.SchemaProperty;
Expand All @@ -14,7 +15,7 @@
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Tag(name = "4. ์‚ฌ์šฉ์ž API", description = "๋น„๋กœ๊ทธ์ธ ์‚ฌ์šฉ์ž(์ธ์ฆ X)์™€ ๊ด€๋ จ๋œ API๋“ค ์ž…๋‹ˆ๋‹ค")
@Tag(name = "5. ์‚ฌ์šฉ์ž API", description = "๋น„๋กœ๊ทธ์ธ ์‚ฌ์šฉ์ž(์ธ์ฆ X)์™€ ๊ด€๋ จ๋œ API๋“ค ์ž…๋‹ˆ๋‹ค")
@RestController
@RequiredArgsConstructor
@RequestMapping("/api/user")
Expand All @@ -23,6 +24,7 @@ public class UserApiController {
private final UserApiService userApiService;

@GetMapping("/nickname/{nickname}")
@Operation(summary = "๋‹‰๋„ค์ž„ ์ค‘๋ณต ํ™•์ธ", description = "์ค‘๋ณต๋˜๋Š” ๋‹‰๋„ค์ž„์ด ์ด๋ฏธ ์žˆ๋Š”์ง€ ์กฐํšŒํ•ฉ๋‹ˆ๋‹ค")
@ApiResponses({
@ApiResponse(responseCode = "200", description = "๋‹‰๋„ค์ž„ ์ค‘๋ณต ํ™•์ธ ์„ฑ๊ณต",
content = @Content(schemaProperties = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

@Tag(name = "5. ์‚ฌ์šฉ์ž", description = "์‚ฌ์šฉ์ž ์ •๋ณด ๊ด€๋ จ API๋“ค ์ž…๋‹ˆ๋‹ค")
@Tag(name = "6. ์‚ฌ์šฉ์ž", description = "์‚ฌ์šฉ์ž ์ •๋ณด ๊ด€๋ จ API๋“ค ์ž…๋‹ˆ๋‹ค")
@RestController
@RequiredArgsConstructor
@RequestMapping("/user")
Expand All @@ -45,7 +45,7 @@ public Response updateUser(@RequestPart("userImage") MultipartFile userImage,
return new Response("message", userService.updateUser(user, userImage, requestDto));
}

@GetMapping("/{user}")
@GetMapping("/{userId}")
@Operation(summary = "์‚ฌ์šฉ์ž ์กฐํšŒ", description = "์ฃผ์–ด์ง„ id์˜ ์‚ฌ์šฉ์ž ์ƒ์„ธ ์ •๋ณด๋ฅผ ๋ฐ˜ํ™˜ํ•ฉ๋‹ˆ๋‹ค.")
@ApiResponses({
@ApiResponse(responseCode = "200", description = "์‚ฌ์šฉ์ž ์กฐํฌ ์„ฑ๊ณต",
Expand Down Expand Up @@ -133,7 +133,7 @@ public Response userFollower(@RequestParam Long userId, Pageable pageable){
return new Response("followerList", userService.userFollowerList(userId, pageable));
}

@GetMapping("/stats/{user}")
@GetMapping("/stats/{userId}")
@Operation(summary = "์‚ฌ์šฉ์ž ์ƒํƒœ ์กฐํšŒ", description = "์‚ฌ์šฉ์ž ํŽ˜์ด์ง€ ํ—ค๋” ์ •๋ณด (ํŒ”๋กœ์›Œ ์ˆ˜, ํŒ”๋กœ์ž‰ ์ˆ˜, ๋‹ฌ์„ฑ๋ฅ )์„ ์กฐํšŒํ•ฉ๋‹ˆ๋‹ค.")
@ApiResponses({
@ApiResponse(responseCode = "200", description = "์‚ฌ์šฉ์ž ์ƒํƒœ ์กฐํšŒ ์„ฑ๊ณต",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
package com.ggums.ggumtle.dto.request;

import com.ggums.ggumtle.entity.Gender;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import jakarta.validation.constraints.Size;
import lombok.Getter;

import java.time.LocalDate;
import java.util.List;

@Getter
public class OAuthJoinRequestDto {

private String authorizationCode;

@NotNull(message = "ํ•„์ˆ˜ ์ •๋ณด์ž…๋‹ˆ๋‹ค.")
@Size(max = 50, message = "notEmailFormat")
@Pattern(regexp = "^[a-zA-Z0-9.!#$%&โ€™*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\\.[a-zA-Z0-9-]+)*$", message = "notEmailFormat")
private String userEmail;

@Schema(example = "ํ™”์ดํŒ… 10๊ธฐ")
@Size(max = 255, message = "๋‹‰๋„ค์ž„ ํฌ๊ธฐ๊ฐ€ ์ดˆ๊ณผํ•˜์˜€์Šต๋‹ˆ๋‹ค.")
private String userNickname;

@Schema(example = "2023-07-03")
private LocalDate birthDate;
@Schema(example = "Male")
private Gender gender;

@Schema(example = "[\"์ทจ์—…\",\"์—ฌํ–‰\",\"์ธ๊ฐ„๊ด€๊ณ„\"]")
private List<String> category;
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ public class PostBucketReactionRequestDto {
private Long bucketId;

@Size(max = 255, message = "๋ฆฌ์•ก์…˜ ํฌ๊ธฐ๋ฅผ ์ดˆ๊ณผํ•˜์˜€์Šต๋‹ˆ๋‹ค.")
@Schema(example = "๋ฉ‹์ ธ์š”")
private String userReaction;
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,7 @@ public class PostReviewRequestDto {

@Schema(description = "ํ›„๊ธฐ ๋‚ด์šฉ", example = "<p>๊ตฌ๋…์ž๋“ค ์งฑ ๋งŽ์•„์š”!</p>")
private String context;

@Schema(description = "๊ฒŒ์‹œ ์—ฌ๋ถ€ (์ž„์‹œ์ €์žฅ์ธ ๊ฒฝ์šฐ false)", example = "true")
private Boolean isPosted;
}
Loading

0 comments on commit 84bf5e7

Please sign in to comment.