Skip to content

Commit

Permalink
swagger 문서 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
awesomeo184 committed Nov 18, 2023
1 parent f2483ed commit a7d0908
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 9 deletions.
9 changes: 5 additions & 4 deletions src/main/java/com/offer/msg/presentation/MsgController.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import com.offer.msg.application.response.MsgRoomInfoResponse;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import lombok.RequiredArgsConstructor;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
Expand All @@ -25,7 +26,7 @@ public class MsgController {
private final MsgService msgService;
private final MsgRoomService msgRoomService;

@Operation(summary = "쪽지 room 생성")
@Operation(summary = "쪽지 room 생성", security = {@SecurityRequirement(name = "jwt")})
@PostMapping("/api/msgrooms")
public ResponseEntity<ApiResponse<CommonCreationResponse>> createMsgRoom(
@Schema(hidden = true) @AuthenticationPrincipal LoginMember loginMember,
Expand All @@ -39,7 +40,7 @@ public ResponseEntity<ApiResponse<CommonCreationResponse>> createMsgRoom(
);
}

@Operation(summary = "쪽지 room 목록 조회")
@Operation(summary = "쪽지 room 목록 조회", security = {@SecurityRequirement(name = "jwt")})
@GetMapping("/api/msgrooms")
public ResponseEntity<ApiResponse<List<MsgRoomInfoResponse>>> getMsgRooms(
@Schema(hidden = true) @AuthenticationPrincipal LoginMember loginMember,
Expand All @@ -52,7 +53,7 @@ public ResponseEntity<ApiResponse<List<MsgRoomInfoResponse>>> getMsgRooms(
);
}

@Operation(summary = "쪽지 보내기")
@Operation(summary = "쪽지 보내기", security = {@SecurityRequirement(name = "jwt")})
@PostMapping("/api/msgrooms/{msgRoomId}/msgs")
public ResponseEntity<ApiResponse<CommonCreationResponse>> sendMsg(
@Schema(hidden = true) @AuthenticationPrincipal LoginMember loginMember,
Expand All @@ -67,7 +68,7 @@ public ResponseEntity<ApiResponse<CommonCreationResponse>> sendMsg(
);
}

@Operation(summary = "특정 쪽지 room의 전체 쪽지 내용 조회")
@Operation(summary = "특정 쪽지 room의 전체 쪽지 내용 조회", security = {@SecurityRequirement(name = "jwt")})
@GetMapping("/api/msgrooms/{msgRoomId}/msgs")
public ResponseEntity<ApiResponse<List<MsgInfoResponse>>> getAllMsgs(
@Schema(hidden = true) @AuthenticationPrincipal LoginMember loginMember,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import com.offer.offer.application.response.OffersResponse;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import lombok.RequiredArgsConstructor;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
Expand All @@ -20,7 +21,7 @@ public class OfferController {

private final OfferService offerService;

@Operation(summary = "가격제안 생성")
@Operation(summary = "가격제안 생성", security = {@SecurityRequirement(name = "jwt")})
@PostMapping("/api/posts/{postId}/offers")
public ResponseEntity<ApiResponse<CommonCreationResponse>> createOffer(
@PathVariable Long postId, @RequestBody OfferCreateRequest request,
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/com/offer/post/presentation/LikeController.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import com.offer.post.application.response.PostSummary;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import lombok.RequiredArgsConstructor;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
Expand All @@ -21,7 +22,7 @@
public class LikeController {
private final LikeService likeService;

@Operation(summary = "좋아요 상태 변환")
@Operation(summary = "좋아요 상태 변환", security = {@SecurityRequirement(name = "jwt")})
@PutMapping("/posts/likes")
public ResponseEntity<ApiResponse> toggle(
@Schema(hidden = true) @AuthenticationPrincipal LoginMember loginMember,
Expand All @@ -34,7 +35,7 @@ public ResponseEntity<ApiResponse> toggle(
);
}

@Operation(summary = "내가 좋아한 모든 게시물")
@Operation(summary = "내가 좋아한 모든 게시물", security = {@SecurityRequirement(name = "jwt")})
@GetMapping("/posts/likes")
public ResponseEntity<ApiResponse<List<PostSummary>>> getAll(
@Schema(hidden = true) @AuthenticationPrincipal LoginMember loginMember,
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/offer/post/presentation/PostController.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public class PostController {

private final PostService postService;

@Operation(summary = "게시글 생성")
@Operation(summary = "게시글 생성", security = {@SecurityRequirement(name = "jwt")})
@PostMapping("/posts")
public ResponseEntity<ApiResponse<CommonCreationResponse>> createPost(
@Schema(hidden = true) @AuthenticationPrincipal LoginMember loginMember,
Expand All @@ -48,7 +48,7 @@ public ResponseEntity<ApiResponse<CommonCreationResponse>> createPost(
);
}

@Operation(summary = "게시글 목록 조회", security = {@SecurityRequirement(name = "bearer-key")})
@Operation(summary = "게시글 목록 조회", security = {@SecurityRequirement(name = "jwt")})
@GetMapping("/posts")
public ResponseEntity<ApiResponse<PostSummaries>> showPosts(
@Schema(hidden = true) @AuthenticationPrincipal LoginMember loginMember,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
import com.offer.review.application.request.ReviewCreateRequest;
import com.offer.review.application.response.ReviewInfoResponse;
import com.offer.review.domain.Role;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import lombok.RequiredArgsConstructor;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
Expand All @@ -22,6 +24,7 @@
public class ReviewController {
private final ReviewService reviewService;

@Operation(summary = "리뷰 생성", security = {@SecurityRequirement(name = "jwt")})
@PostMapping("/reviews")
public ResponseEntity<ApiResponse<CommonCreationResponse>> createReview(
@Schema(hidden = true) @AuthenticationPrincipal LoginMember loginMember,
Expand All @@ -34,6 +37,7 @@ public ResponseEntity<ApiResponse<CommonCreationResponse>> createReview(
);
}

@Operation(summary = "리뷰 조회", security = {@SecurityRequirement(name = "jwt")})
@GetMapping("/reviews")
public ResponseEntity<ApiResponse<List<ReviewInfoResponse>>> getReviews(
@Schema(hidden = true) @AuthenticationPrincipal LoginMember loginMember,
Expand Down

0 comments on commit a7d0908

Please sign in to comment.