Skip to content

V2 모임 Swagger 작성#144

Merged
LimdaeIl merged 3 commits intomainfrom
feat/swagger-v2-group
Dec 22, 2025
Merged

V2 모임 Swagger 작성#144
LimdaeIl merged 3 commits intomainfrom
feat/swagger-v2-group

Conversation

@LimdaeIl
Copy link
Collaborator

@LimdaeIl LimdaeIl commented Dec 22, 2025

📝 Pull Request

📌 PR 종류

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

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

✨ 변경 내용

V2 모임 Swagger 작성

🔍 관련 이슈

🧪 테스트

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

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

🚨 확인해야 할 사항 (Checklist)

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

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

🙋 기타 참고 사항

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

Summary by CodeRabbit

릴리스 노트

  • 문서화

    • V1 모임 및 모임 이미지 API 문서의 버전 표기를 개선하여 더 명확한 API 구분 제공
  • 새로운 기능

    • V2 모임 관리 API 추가 (생성, 조회, 참가, 탈퇴, 목록, 수정, 삭제)
    • V2 모임 이미지 업로드 API 추가
  • 개선

    • 모임 멤버십 데이터 구조 최적화

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

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

coderabbitai bot commented Dec 22, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

V1 모임 API의 Swagger 태그를 버전별로 구분하고, 새로운 V2 모임 API 문서 인터페이스(GroupV2ControllerDocs, GroupImageV2ControllerDocs)를 추가했습니다. 컨트롤러들이 각각의 문서 인터페이스를 구현하도록 변경하고, MyMembership 레코드에서 isJoined 필드를 제거했습니다.

Changes

Cohort / File(s) Summary
V1 API Swagger 태그 업데이트
src/main/java/team/wego/wegobackend/group/presentation/v1/GroupControllerDocs.java, src/main/java/team/wego/wegobackend/group/presentation/v1/GroupImageControllerDocs.java
@Tag 애노테이션의 name과 description을 "V1 모임 API", "V1 모임 이미지 API"로 업데이트하여 버전 구분
V2 컨트롤러 문서 인터페이스 추가
src/main/java/team/wego/wegobackend/group/v2/presentation/GroupV2ControllerDocs.java, src/main/java/team/wego/wegobackend/group/v2/presentation/GroupImageV2ControllerDocs.java
새로운 Swagger 문서 인터페이스 정의: GroupV2ControllerDocs는 8개 메서드(create, getGroup, attend, left, getGroupList, update, getMyGroups, delete) 포함, GroupImageV2ControllerDocs는 uploadImages 메서드 포함
V2 컨트롤러 인터페이스 구현
src/main/java/team/wego/wegobackend/group/v2/presentation/GroupV2Controller.java, src/main/java/team/wego/wegobackend/group/v2/presentation/GroupImageV2Controller.java
각 컨트롤러가 해당 문서 인터페이스를 구현하도록 변경; GroupImageV2Controller는 @PostMapping 포맷 정렬
MyMembership 레코드 필드 제거
src/main/java/team/wego/wegobackend/group/v2/application/dto/common/MyMembership.java
isJoined 부울 필드 제거; 생성자 시그니처를 6개 파라미터에서 5개 파라미터로 변경; from() 메서드와 orElse() 폴백 업데이트

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • 대부분 반복적인 Swagger 애노테이션 업데이트로 일관된 패턴
  • 새로운 문서 인터페이스는 메서드 선언만 포함하는 구조적 추가
  • MyMembership 필드 제거는 단순한 레코드 시그니처 변경
  • 컨트롤러의 인터페이스 구현은 구조적 변경으로 기능 로직 변화 없음

추가 검토 고려사항:

  • GroupV2ControllerDocs.java: 8개 메서드의 파라미터와 반환 타입이 실제 구현체(GroupV2Controller)와 일치하는지 확인
  • MyMembership.java: isJoined 필드 제거가 기존 사용처에서 문제가 없는지 확인

Possibly related PRs

Poem

🐰 V2 API 문서를 정렬하며,
V1과 V2를 구분 짓고,
isJoined는 작별하고,
깔끔한 인터페이스로
Swagger 태그가 춤을 춘다 ✨

✨ 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/swagger-v2-group

📜 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 96f1910 and fcacc3d.

📒 Files selected for processing (7)
  • src/main/java/team/wego/wegobackend/group/presentation/v1/GroupControllerDocs.java
  • src/main/java/team/wego/wegobackend/group/presentation/v1/GroupImageControllerDocs.java
  • src/main/java/team/wego/wegobackend/group/v2/application/dto/common/MyMembership.java
  • src/main/java/team/wego/wegobackend/group/v2/presentation/GroupImageV2Controller.java
  • src/main/java/team/wego/wegobackend/group/v2/presentation/GroupImageV2ControllerDocs.java
  • src/main/java/team/wego/wegobackend/group/v2/presentation/GroupV2Controller.java
  • src/main/java/team/wego/wegobackend/group/v2/presentation/GroupV2ControllerDocs.java

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 e1b70ad into main Dec 22, 2025
4 of 5 checks passed
@LimdaeIl LimdaeIl deleted the feat/swagger-v2-group branch December 22, 2025 01:03
@github-project-automation github-project-automation bot moved this from In progress to Done in WeGo-Together Backend Dec 22, 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 comprehensive Swagger/OpenAPI documentation for the V2 Group API endpoints. The documentation follows the interface-based pattern established in V1, providing clear API descriptions for group management operations including creation, retrieval, modification, and image handling.

Key changes:

  • Created Swagger documentation interfaces for V2 group and group image endpoints
  • Updated V1 API tags to include "V1" prefix for better version distinction
  • Removed redundant isJoined field from MyMembership DTO

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
GroupV2ControllerDocs.java New Swagger documentation interface for V2 group operations (create, get, update, delete, attend, list)
GroupImageV2ControllerDocs.java New Swagger documentation interface for V2 group image upload operations
GroupV2Controller.java Implements the new GroupV2ControllerDocs interface and adds minor code formatting
GroupImageV2Controller.java Implements the new GroupImageV2ControllerDocs interface and formats PostMapping spacing
MyMembership.java Removes redundant isJoined boolean field, simplifies to 5 parameters
GroupImageControllerDocs.java Updates Tag name from "모임 이미지 API" to "V1 모임 이미지 API"
GroupControllerDocs.java Updates Tag name from "모임 API" to "V1 모임 API"
Comments suppressed due to low confidence (7)

src/main/java/team/wego/wegobackend/group/v2/presentation/GroupV2Controller.java:161

    public ResponseEntity<Void> delete(

src/main/java/team/wego/wegobackend/group/v2/presentation/GroupV2Controller.java:130

    public ResponseEntity<ApiResponse<GetMyGroupListV2Response>> getMyGroups(

src/main/java/team/wego/wegobackend/group/v2/presentation/GroupV2Controller.java:119

    public ResponseEntity<ApiResponse<UpdateGroupV2Response>> update(

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

    public ResponseEntity<ApiResponse<GetGroupListV2Response>> getGroupList(

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

    public ResponseEntity<ApiResponse<AttendGroupV2Response>> left(

src/main/java/team/wego/wegobackend/group/v2/presentation/GroupV2Controller.java:74

    public ResponseEntity<ApiResponse<AttendGroupV2Response>> attend(

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

    public ResponseEntity<ApiResponse<GetGroupV2Response>> getGroup(

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

모임에 사용할 이미지를 업로드하기 전에, S3 등의 스토리지에 미리 업로드하고
그 결과(이미지 URL, 키 등)를 응답으로 반환합니다.

- images(Arrays): 업로드할 이미지 파일 리스트 (최소 1개 이상)
Copy link

Copilot AI Dec 22, 2025

Choose a reason for hiding this comment

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

The description uses "images(Arrays)" format to describe the parameter type, but this is inconsistent with the V1 GroupImageControllerDocs which simply uses "images:" without type annotation. For consistency with the existing codebase pattern (as seen in GroupImageControllerDocs.java:28), the parameter description should be "- images: 업로드할 이미지 파일 리스트 (최소 1개 이상)" without the "(Arrays)" suffix.

Copilot uses AI. Check for mistakes.
- keyword: 모임 제목/내용 검색에 사용되는 선택값
- cursor: 마지막으로 조회한 모임 ID(커서 기반 페이징)
- size: 한 번에 조회할 모임 개수
- filter: 모임 상태 필터(ACTIVE, ARCHIVED, FULL)
Copy link

Copilot AI Dec 22, 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 the filter parameter accepts "ACTIVE, ARCHIVED, FULL", but according to the GroupListFilter enum (line 6-9), the valid values are "ACTIVE", "ARCHIVED", and "ALL" (not "FULL"). "FULL" is a GroupV2Status value, not a filter value. The documentation should list "ACTIVE, ARCHIVED, ALL" as valid filter options.

Suggested change
- filter: 모임 상태 필터(ACTIVE, ARCHIVED, FULL)
- filter: 모임 상태 필터(ACTIVE, ARCHIVED, ALL)

Copilot uses AI. Check for mistakes.

- cursor: 마지막으로 조회한 모임 ID(커서 기반 페이징)
- size: 한 번에 조회할 모임 개수
- filter: 모임 상태 필터(ACTIVE, ARCHIVED, FULL)
Copy link

Copilot AI Dec 22, 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 the filter parameter accepts "ACTIVE, ARCHIVED, FULL", but according to the GroupListFilter enum (line 6-9), the valid values are "ACTIVE", "ARCHIVED", and "ALL" (not "FULL"). "FULL" is a GroupV2Status value, not a filter value. The documentation should list "ACTIVE, ARCHIVED, ALL" as valid filter options.

Suggested change
- filter: 모임 상태 필터(ACTIVE, ARCHIVED, FULL)
- filter: 모임 상태 필터(ACTIVE, ARCHIVED, ALL)

Copilot uses AI. Check for mistakes.
public interface GroupImageV2ControllerDocs {

@Operation(
summary = "V2 모임 이미지 사전 업로드 API",
Copy link

Copilot AI Dec 22, 2025

Choose a reason for hiding this comment

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

The summary includes "V2" prefix ("V2 모임 이미지 사전 업로드 API"), but this is inconsistent with the V1 API documentation pattern where summaries don't include version prefixes. For example, V1 GroupImageControllerDocs uses "모임 이미지 사전 업로드 API" without the "V1" prefix. Since the @tag already indicates this is "V2 모임 이미지 API", the version prefix in individual operation summaries is redundant. Consider removing "V2" from the summary for consistency.

Copilot uses AI. Check for mistakes.
type 값에 따라 조회 대상이 달라질 수 있습니다.
type: current / past / myPost
- current: 현재 참가 중인 모임
- host: 내가 호스트인 모임
Copy link

Copilot AI Dec 22, 2025

Choose a reason for hiding this comment

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

The documentation describes type values as "current / past / myPost", but according to the MyGroupTypeV2 enum, the actual value should be "myPost" (camelCase), not "my_post" or another variant. However, there's an inconsistency: the enum defines MY_POST("myPost") but the documentation mentions "host" as one of the types on line 111, which doesn't exist in the MyGroupTypeV2 enum. The valid types are: "current", "myPost", and "past".

Suggested change
- host: 내가 호스트인 모임
- myPost: 내가 호스트인 모임

Copilot uses AI. Check for mistakes.
- includeStatuses가 있으면 filter의 기본 include는 무시됩니다.
- excludeStatuses가 있으면 해당 상태는 제외됩니다.
- include와 exclude가 동시에 충돌하면 exclude가 우선됩니다.
- myStatuses: 내 참여 상태(ATTEND, LEFT, KICKED,BANNED)
Copy link

Copilot AI Dec 22, 2025

Choose a reason for hiding this comment

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

There's a spacing inconsistency in the myStatuses parameter description. On line 122, there's missing space between "KICKED," and "BANNED". It should be "ATTEND, LEFT, KICKED, BANNED" with spaces after commas for consistency.

Suggested change
- myStatuses: 참여 상태(ATTEND, LEFT, KICKED,BANNED)
- myStatuses: 참여 상태(ATTEND, LEFT, KICKED, BANNED)

Copilot uses AI. Check for mistakes.


@PostMapping(value="/upload", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
@PostMapping(value = "/upload", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
Copy link

Copilot AI Dec 22, 2025

Choose a reason for hiding this comment

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

This method overrides GroupImageV2ControllerDocs.uploadImages; it is advisable to add an Override annotation.

Suggested change
@PostMapping(value = "/upload", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
@PostMapping(value = "/upload", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
@Override

Copilot uses AI. Check for mistakes.
private final GroupV2DeleteService groupV2DeleteService;


@PostMapping("/create")
Copy link

Copilot AI Dec 22, 2025

Choose a reason for hiding this comment

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

This method overrides GroupV2ControllerDocs.create; it is advisable to add an Override annotation.

Suggested change
@PostMapping("/create")
@PostMapping("/create")
@Override

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] V2 모임 Swagger 작성

1 participant

Comments