Skip to content

FEAT] 모임 Swagger 설정#82

Merged
LimdaeIl merged 1 commit intomainfrom
feat/group-swagger
Dec 11, 2025
Merged

FEAT] 모임 Swagger 설정#82
LimdaeIl merged 1 commit intomainfrom
feat/group-swagger

Conversation

@LimdaeIl
Copy link
Collaborator

@LimdaeIl LimdaeIl commented Dec 11, 2025

📝 Pull Request

📌 PR 종류

해당하는 항목에 체크해주세요.

  • 기능 추가 (Feature)
  • 버그 수정 (Fix)
  • 문서 수정 (Docs)
  • 코드 리팩터링 (Refactor)
  • 테스트 추가 (Test)
  • 기타 변경 (Chore)

✨ 변경 내용

Swagger 추가작업의 경우에는 Docs 인터페이스를 통해서 해주시면 됩니다. (For 가독성)
doc 작업은 Tag, Operation 두가지만 사용하여 가독성을 챙겨주는게 좋을 것 같습니다.

코멘트에 따라 진행했습니다.


🔍 관련 이슈

🧪 테스트

변경된 기능에 대한 테스트 범위 또는 테스트 결과를 작성해주세요.

  • 유닛 테스트 추가 / 수정
  • 통합 테스트 검증
  • 수동 테스트 완료

🚨 확인해야 할 사항 (Checklist)

PR을 제출하기 전에 아래 항목들을 확인해주세요.

  • 코드 포매팅 완료
  • 불필요한 파일/코드 제거
  • 로직 검증 완료
  • 프로젝트 빌드 성공
  • 린트/정적 분석 통과 (해당 시)

🙋 기타 참고 사항

리뷰어가 참고하면 좋을 만한 추가 설명이 있다면 적어주세요.

Summary by CodeRabbit

  • Refactor
    • 모임 API 엔드포인트(생성, 참가, 취소, 조회, 목록, 수정, 삭제, 내 모임 조회) 구조 개선
    • 모임 이미지 관리 API(업로드, 수정, 삭제) 구조 개선

✏️ Tip: You can customize this high-level summary in your review settings.

@LimdaeIl LimdaeIl self-assigned this Dec 11, 2025
Copilot AI review requested due to automatic review settings December 11, 2025 08:12
@LimdaeIl LimdaeIl added the ✨enhancement New feature or request label Dec 11, 2025
@LimdaeIl LimdaeIl moved this from Backlog to In progress in WeGo-Together Backend Dec 11, 2025
@coderabbitai
Copy link

coderabbitai bot commented Dec 11, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

모임 관련 API의 Swagger 문서화를 위해 두 개의 새로운 인터페이스(GroupControllerDocs, GroupImageControllerDocs)를 추가하고, 기존 컨트롤러가 이 인터페이스를 구현하도록 변경했습니다. 동작 변화는 없으며 순수 문서화 계약 추가입니다.

Changes

집단 / 파일 변경 요약
GroupControllerDocs 인터페이스 추가
src/main/java/team/wego/wegobackend/group/presentation/GroupControllerDocs.java
모임 생성, 참여, 취소, 조회, 목록 조회, 수정, 삭제, 내 모임 조회 등 8개의 API 엔드포인트를 Swagger 주석과 함께 정의하는 새로운 인터페이스 추가
GroupController 인터페이스 구현
src/main/java/team/wego/wegobackend/group/presentation/GroupController.java
GroupController가 GroupControllerDocs 인터페이스를 구현하도록 클래스 선언 수정
GroupImageControllerDocs 인터페이스 추가
src/main/java/team/wego/wegobackend/group/presentation/GroupImageControllerDocs.java
모임 이미지 업로드, 수정, 삭제 등 3개의 API 엔드포인트를 Swagger 주석과 함께 정의하는 새로운 인터페이스 추가
GroupImageController 인터페이스 구현
src/main/java/team/wego/wegobackend/group/presentation/GroupImageController.java
GroupImageController가 GroupImageControllerDocs 인터페이스를 구현하도록 클래스 선언 수정

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

  • GroupControllerDocs: 인터페이스 메서드 시그니처와 Swagger 주석 검증 필요
  • GroupImageControllerDocs: 3개 메서드 정의 및 문서화 일관성 확인
  • 컨트롤러 인터페이스 구현: 실제 구현부와 인터페이스 메서드 시그니처 일치 확인

Possibly related PRs

Poem

🐰 Swagger 문서 깨끗이 정리하고,
인터페이스로 계약을 세우니,
API는 더욱 명확하고 반짝반짝,
모임 기능들 한눈에 쏙쏙!
문서의 마법으로 개발자 즐거워~ ✨

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/group-swagger

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between bed567e and 194f068.

📒 Files selected for processing (4)
  • src/main/java/team/wego/wegobackend/group/presentation/GroupController.java (1 hunks)
  • src/main/java/team/wego/wegobackend/group/presentation/GroupControllerDocs.java (1 hunks)
  • src/main/java/team/wego/wegobackend/group/presentation/GroupImageController.java (1 hunks)
  • src/main/java/team/wego/wegobackend/group/presentation/GroupImageControllerDocs.java (1 hunks)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@LimdaeIl LimdaeIl merged commit 62d27f5 into main Dec 11, 2025
4 of 5 checks passed
@LimdaeIl LimdaeIl deleted the feat/group-swagger branch December 11, 2025 08:12
@github-project-automation github-project-automation bot moved this from In progress to Done in WeGo-Together Backend Dec 11, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds Swagger/OpenAPI documentation for the group (모임) API endpoints by introducing separate documentation interfaces (GroupControllerDocs and GroupImageControllerDocs) that are implemented by the corresponding controller classes. This follows a clean separation pattern where API documentation is maintained in dedicated interfaces for better readability.

Key Changes:

  • Created GroupImageControllerDocs interface with Swagger annotations for image upload, update, and delete operations
  • Created GroupControllerDocs interface with Swagger annotations for all group CRUD and participation operations
  • Updated GroupImageController and GroupController to implement their respective documentation interfaces

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.

File Description
GroupImageControllerDocs.java New documentation interface defining Swagger annotations for group image operations (upload, update, delete)
GroupControllerDocs.java New documentation interface defining Swagger annotations for group operations (create, attend, cancel, get, list, update, delete, my groups)
GroupImageController.java Updated to implement GroupImageControllerDocs interface
GroupController.java Updated to implement GroupControllerDocs interface
Comments suppressed due to low confidence (11)

src/main/java/team/wego/wegobackend/group/presentation/GroupController.java:128

    public ResponseEntity<ApiResponse<GetGroupListResponse>> getMyGroups(

src/main/java/team/wego/wegobackend/group/presentation/GroupController.java:115

    public ResponseEntity<ApiResponse<Void>> deleteGroup(

src/main/java/team/wego/wegobackend/group/presentation/GroupController.java:102

    public ResponseEntity<ApiResponse<GetGroupResponse>> updateGroup(

src/main/java/team/wego/wegobackend/group/presentation/GroupController.java:89

    public ResponseEntity<ApiResponse<GetGroupListResponse>> getGroupList(

src/main/java/team/wego/wegobackend/group/presentation/GroupController.java:75

    public ResponseEntity<ApiResponse<GetGroupResponse>> getGroupResponse(

src/main/java/team/wego/wegobackend/group/presentation/GroupController.java:63

    public ResponseEntity<ApiResponse<GetGroupResponse>> cancelAttendGroup(

src/main/java/team/wego/wegobackend/group/presentation/GroupController.java:49

    public ResponseEntity<ApiResponse<GetGroupResponse>> attendGroup(

src/main/java/team/wego/wegobackend/group/presentation/GroupImageController.java:62

    public ResponseEntity<ApiResponse<Void>> deleteGroupImages(

src/main/java/team/wego/wegobackend/group/presentation/GroupImageController.java:47

    public ResponseEntity<ApiResponse<List<GroupImageItemResponse>>> updateGroupImages(

src/main/java/team/wego/wegobackend/group/presentation/GroupImageController.java:34

    public ResponseEntity<ApiResponse<PreUploadGroupImageResponse>> uploadImages(

src/main/java/team/wego/wegobackend/group/presentation/GroupController.java:35

    public ResponseEntity<ApiResponse<CreateGroupResponse>> createGroupResponse(

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

비회원도 조회 가능하며, 로그인한 유저일 경우 참가 여부/호스트 여부 등 추가 정보가 포함될 수 있습니다.
"""
)
ResponseEntity<ApiResponse<GetGroupResponse>> getGroupResponse(
Copy link

Copilot AI Dec 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The method name "getGroupResponse" is ambiguous. It suggests the method returns a response object wrapper, rather than retrieving group details. Consider renaming to "getGroup" to better reflect that this method retrieves a specific group (모임).

Suggested change
ResponseEntity<ApiResponse<GetGroupResponse>> getGroupResponse(
ResponseEntity<ApiResponse<GetGroupResponse>> getGroup(

Copilot uses AI. Check for mistakes.
@RequestMapping("/api/v1/groups/images")
@RestController
public class GroupImageController {
public class GroupImageController implements GroupImageControllerDocs {
Copy link

Copilot AI Dec 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is an extra space before the opening brace. "GroupImageControllerDocs {" should be "GroupImageControllerDocs {" (single space instead of double space).

Suggested change
public class GroupImageController implements GroupImageControllerDocs {
public class GroupImageController implements GroupImageControllerDocs {

Copilot uses AI. Check for mistakes.
summary = "모임 이미지 삭제 API",
description = """
특정 모임에 연결된 이미지들을 삭제합니다.
모임 호스트 또는 권한이 있는 유저만 삭제할 수 있습니다.
Copy link

Copilot AI Dec 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The documentation states that only the group host or authorized users can delete images. However, this authorization requirement should be documented more specifically - is there a permission check in place? Consider clarifying what "권한이 있는 유저" (authorized user) means in this context or remove this if only the host can delete.

Suggested change
모임 호스트 또는 권한이 있는 유저만 삭제할 있습니다.
모임 호스트만 이미지를 삭제할 있습니다.

Copilot uses AI. Check for mistakes.
대표 이미지 여부, 정렬 순서 등을 수정할 때 사용합니다.

- groupId: 이미지를 수정할 모임 ID
- body: 이미지 항목별 수정 정보 리스트
Copy link

Copilot AI Dec 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The documentation mentions "body: 이미지 항목별 수정 정보 리스트" but the actual parameter name in the method signature is "images", not "body". Consider aligning the documentation parameter name with the actual parameter name for clarity. Change "body:" to "images:" in the description.

Suggested change
- body: 이미지 항목별 수정 정보 리스트
- images: 이미지 항목별 수정 정보 리스트

Copilot uses AI. Check for mistakes.
summary = "모임 생성 API",
description = "새로운 모임을 생성합니다. 로그인한 유저를 모임 호스트로 저장합니다."
)
ResponseEntity<ApiResponse<CreateGroupResponse>> createGroupResponse(
Copy link

Copilot AI Dec 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The method name "createGroupResponse" is ambiguous. It suggests the method returns or creates a response object, rather than creating a group entity. Consider renaming to "createGroup" to better reflect that this method creates a new group (모임).

Suggested change
ResponseEntity<ApiResponse<CreateGroupResponse>> createGroupResponse(
ResponseEntity<ApiResponse<CreateGroupResponse>> createGroup(

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨enhancement New feature or request

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[FEAT] 모임 Swagger 설정

1 participant

Comments