Skip to content

Conversation

@JanooGwan
Copy link
Contributor

ClubApi 분리 했습니다.

다음과 같이 5개로 분리했습니다.

  • 동아리 기본 관리(조회, 생성 등)
  • 동아리 신청
  • 동아리 회원 관리
  • 직책 관리
  • 동아리 모집 공고 관련

Copy link
Contributor

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

이 PR은 ClubApi를 5개의 별도 인터페이스로 분리하여 API 구조를 개선하는 리팩토링 작업입니다.

Changes:

  • 하나의 대형 ClubApi 인터페이스를 5개의 기능별 인터페이스로 분리 (기본 관리, 지원 및 신청, 모집 공고, 직책 관리, 회원 관리)
  • SwaggerConfig에 태그 알파벳 정렬 기능 추가
  • ClubController가 5개의 새로운 인터페이스를 모두 구현하도록 변경

Reviewed changes

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

Show a summary per file
File Description
src/main/java/gg/agit/konect/global/config/SwaggerConfig.java Swagger 문서의 태그를 알파벳 순으로 정렬하는 커스터마이저 추가
src/main/java/gg/agit/konect/domain/club/controller/ClubApi.java 기존 ClubApi 인터페이스 삭제
src/main/java/gg/agit/konect/domain/club/controller/ClubBasicApi.java 동아리 기본 관리 API 인터페이스 생성 (조회, 생성, 수정 등)
src/main/java/gg/agit/konect/domain/club/controller/ClubApplicationApi.java 동아리 지원 및 신청 관련 API 인터페이스 생성
src/main/java/gg/agit/konect/domain/club/controller/ClubRecruitmentApi.java 동아리 모집 공고 관련 API 인터페이스 생성
src/main/java/gg/agit/konect/domain/club/controller/ClubPositionApi.java 동아리 직책 관리 API 인터페이스 생성
src/main/java/gg/agit/konect/domain/club/controller/ClubMemberApi.java 동아리 회원 관리 API 인터페이스 생성
src/main/java/gg/agit/konect/domain/club/controller/ClubController.java 5개의 새로운 인터페이스를 구현하도록 변경, 일부 메소드 삭제
package-lock.json npm 패키지 락 파일 추가 (Java 프로젝트에는 불필요)

Comment on lines +29 to +32
@RequestMapping("/clubs")
public interface ClubBasicApi {

String TAG = "(Normal) Club - Basic: 기본 관리";
Copy link

Copilot AI Jan 27, 2026

Choose a reason for hiding this comment

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

Swagger 태그 정의 방식이 코드베이스의 다른 API들과 일관성이 없습니다. 다른 API 인터페이스들(BankApi, ChatApi, CouncilApi, NoticeApi 등)은 클래스 레벨에서 @tag 어노테이션을 사용하는 반면, 새로운 ClubApi 인터페이스들은 String 상수 TAG를 정의하고 각 @operation의 tags 파라미터에 사용하고 있습니다.

일관성을 위해 다른 API들과 동일한 패턴을 따르는 것을 권장합니다. 예를 들어:

@Tag(name = "(Normal) Club - Basic: 기본 관리")
@RequestMapping("/clubs")
public interface ClubBasicApi {
    @Operation(summary = "...")
    ...
}

참고: src/main/java/gg/agit/konect/domain/bank/controller/BankApi.java:11, src/main/java/gg/agit/konect/domain/chat/controller/ChatApi.java:22

Copilot uses AI. Check for mistakes.
Comment on lines +22 to +25
@RequestMapping("/clubs")
public interface ClubApplicationApi {

String TAG = "(Normal) Club - Application: 지원 및 신청";
Copy link

Copilot AI Jan 27, 2026

Choose a reason for hiding this comment

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

Swagger 태그 정의 방식이 코드베이스의 다른 API들과 일관성이 없습니다. 다른 API 인터페이스들은 클래스 레벨에서 @tag 어노테이션을 사용하는 반면, 이 인터페이스는 String 상수 TAG를 정의하고 각 @operation의 tags 파라미터에 사용하고 있습니다. 일관성을 위해 @tag 어노테이션을 클래스 레벨에서 사용하는 것을 권장합니다.

참고: src/main/java/gg/agit/konect/domain/bank/controller/BankApi.java:11

Copilot uses AI. Check for mistakes.
Comment on lines +19 to +22
@RequestMapping("/clubs")
public interface ClubPositionApi {

String TAG = "(Normal) Club - Position: 직책 관리";
Copy link

Copilot AI Jan 27, 2026

Choose a reason for hiding this comment

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

Swagger 태그 정의 방식이 코드베이스의 다른 API들과 일관성이 없습니다. 다른 API 인터페이스들은 클래스 레벨에서 @tag 어노테이션을 사용하는 반면, 이 인터페이스는 String 상수 TAG를 정의하고 각 @operation의 tags 파라미터에 사용하고 있습니다. 일관성을 위해 @tag 어노테이션을 클래스 레벨에서 사용하는 것을 권장합니다.

참고: src/main/java/gg/agit/konect/domain/bank/controller/BankApi.java:11

Copilot uses AI. Check for mistakes.
Comment on lines +19 to +22
@RequestMapping("/clubs")
public interface ClubMemberApi {

String TAG = "(Normal) Club - Member: 회원 관리";
Copy link

Copilot AI Jan 27, 2026

Choose a reason for hiding this comment

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

Swagger 태그 정의 방식이 코드베이스의 다른 API들과 일관성이 없습니다. 다른 API 인터페이스들은 클래스 레벨에서 @tag 어노테이션을 사용하는 반면, 이 인터페이스는 String 상수 TAG를 정의하고 각 @operation의 tags 파라미터에 사용하고 있습니다. 일관성을 위해 @tag 어노테이션을 클래스 레벨에서 사용하는 것을 권장합니다.

참고: src/main/java/gg/agit/konect/domain/bank/controller/BankApi.java:11

Copilot uses AI. Check for mistakes.
Comment on lines +18 to +21
@RequestMapping("/clubs")
public interface ClubRecruitmentApi {

String TAG = "(Normal) Club - Recruitment: 모집 공고";
Copy link

Copilot AI Jan 27, 2026

Choose a reason for hiding this comment

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

Swagger 태그 정의 방식이 코드베이스의 다른 API들과 일관성이 없습니다. 다른 API 인터페이스들은 클래스 레벨에서 @tag 어노테이션을 사용하는 반면, 이 인터페이스는 String 상수 TAG를 정의하고 각 @operation의 tags 파라미터에 사용하고 있습니다. 일관성을 위해 @tag 어노테이션을 클래스 레벨에서 사용하는 것을 권장합니다.

참고: src/main/java/gg/agit/konect/domain/bank/controller/BankApi.java:11

Copilot uses AI. Check for mistakes.
Comment on lines +50 to +55
public class ClubController implements
ClubBasicApi,
ClubRecruitmentApi,
ClubApplicationApi,
ClubPositionApi,
ClubMemberApi {
Copy link

Copilot AI Jan 27, 2026

Choose a reason for hiding this comment

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

삭제된 API 엔드포인트들이 새로운 인터페이스에 추가되지 않았습니다:

  1. getManagedClubDetail - /managed/{clubId} GET 엔드포인트
  2. approveClubApplication - /{clubId}/applications/{applicationId}/approve POST 엔드포인트
  3. rejectClubApplication - /{clubId}/applications/{applicationId}/reject POST 엔드포인트

이 메소드들은 기존 ClubApi에 존재했지만, 새로운 5개 인터페이스 중 어디에도 포함되지 않아 API가 더 이상 제공되지 않게 됩니다. 서비스 레이어의 구현은 여전히 존재하므로, 이들 메소드를 적절한 인터페이스에 추가해야 합니다:

  • getManagedClubDetail는 ClubBasicApi에 추가
  • approveClubApplicationrejectClubApplication는 ClubApplicationApi에 추가

Copilot uses AI. Check for mistakes.
import gg.agit.konect.domain.club.dto.ClubApplicationAnswersResponse;
import gg.agit.konect.domain.club.dto.ClubApplicationsResponse;
import gg.agit.konect.domain.club.dto.ClubAppliedClubsResponse;
import gg.agit.konect.domain.club.dto.ClubApplicationsResponse;
Copy link

Copilot AI Jan 27, 2026

Choose a reason for hiding this comment

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

import 문의 순서가 일관성이 없습니다. line 12와 13에서 ClubAppliedClubsResponse와 ClubApplicationsResponse의 순서가 알파벳 순서와 다릅니다. 알파벳 순서로 정렬하면 ClubApplicationsResponse(line 13)가 ClubAppliedClubsResponse(line 12)보다 앞에 와야 합니다.

Suggested change
import gg.agit.konect.domain.club.dto.ClubAppliedClubsResponse;
import gg.agit.konect.domain.club.dto.ClubApplicationsResponse;
import gg.agit.konect.domain.club.dto.ClubApplicationsResponse;
import gg.agit.konect.domain.club.dto.ClubAppliedClubsResponse;

Copilot uses AI. Check for mistakes.
@JanooGwan
Copy link
Contributor Author

Copilot 의 리뷰 내용에 따라 수정 완료했습니다!

태그 정의 방식은 그대로 하였음

  • copilot 이 제시한 방식대로 수정하면 한 영역에 똑같은 club 관련 uri 들이 중첩되어 들어가 총 5개의 중복 uri가 (swagger 상에서) 생기는 문제가 발생합니다...
    누락된 엔드포인트 추가
  • ClubApi 를 분리하는 과정에서 엔드포인트 누락이 있었습니다. 죄송합니다... 확인 후 추가 완료했습니다

@dh2906

@dh2906
Copy link
Contributor

dh2906 commented Jan 28, 2026

인터페이스에서 태그를 분리해도 구현체가 하나라서 스웨거에는 통합되는 것으로 보여요. 그냥 컨트롤러도 분리하는건 어떻게 생각하시나요

@JanooGwan
Copy link
Contributor Author

그게 좋을 것 같습니다
Controller는 하나로 유지하면서 태그를 분리하려니 깔끔하게 안 되는 것 같습니다
controller도 분리하도록 하겠습니다

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants