Skip to content

T-16 활동 공개 API - #70

Open
ff1451 wants to merge 1 commit into
feat/t15-activity-crudfrom
feat/t16-activity-public-api
Open

T-16 활동 공개 API#70
ff1451 wants to merge 1 commit into
feat/t15-activity-crudfrom
feat/t16-activity-public-api

Conversation

@ff1451

@ff1451 ff1451 commented Aug 19, 2026

Copy link
Copy Markdown

요약

  • GET /v1/activities?category= : 연도 그룹 타임라인(연도 내림차순 → 월 내림차순 → display_order, AC-3.1/AC-3.2).
  • GET /v1/activities/{id} : 상세. 숨김·삭제는 404(INV-11, AC-3.7).
  • thumbnailUrl = 이미지 첫 장(AC-3.4), content 없으면 hasDetail: false(AC-3.9).
  • 카테고리는 slug로 조회하되 숨겨진 카테고리는 존재하지 않는 카테고리와 동일하게 404 처리.
  • CurriculumQueryService와 같은 방식으로 N+1을 명시적으로 피했다 — 활동 목록 1쿼리 + 이미지 IN절 배치 조회 1쿼리, 연도/그룹 수와 무관하게 쿼리 수 고정.

놓치기 쉬운 부분

  • SecurityConfig/v1/activities/** permitAll을 추가했다. 빠뜨리면 공개 API인데도 401이 난다(실제로 처음 테스트 작성 시 이 문제로 전부 실패했다가 고쳤다).

검증

  • ./gradlew test 전체 통과, 3회 연속 재실행.
  • AC-3.1, AC-3.2, AC-3.4, AC-3.7, AC-3.9와 "존재하지 않는/숨긴 카테고리 404"를 통합 테스트로 커버.
  • 참고: 3회차 실행 중 이 도메인과 무관한 InitialSetupIntegrationTest(자체 Testcontainers 컨테이너)가 SSL 핸드셰이크 일시 오류로 한 번 실패했다. 격리 재실행 시 바로 통과해 인프라성 flake로 판단했다.

남은 항목

  • T-17(이미지 업로드), T-18(트랙 멤버 배정) 등은 별도 태스크.

Refs #28 (프로젝트), 브랜치는 feat/t15-activity-crud(#69) 위에 스택 — 앞선 T-14(#68)까지 함께 포함된 상태입니다.

머지하지 않습니다. 부원 리뷰 후 직접 머지 예정입니다.

- GET /v1/activities?category= : 연도 그룹 타임라인. 연도 내림차순 → 월 내림차순 →
  display_order 순(AC-3.1, AC-3.2). CurriculumQueryService와 같은 이유로 N+1을 명시적으로
  피한다 — 활동 목록 1쿼리 + 이미지 IN절 배치 조회 1쿼리로, 연도/활동 개수와 무관하게
  쿼리 수가 고정된다.
- GET /v1/activities/{id} : 상세. 숨김·삭제된 활동은 404(INV-11, AC-3.7).
- thumbnailUrl은 이미지 목록의 첫 장(AC-3.4), content가 비어 있으면 hasDetail: false
  (AC-3.9, Activity.hasDetail() 재사용).
- category 파라미터는 slug로 찾되 숨겨진 카테고리는 존재하지 않는 것과 동일하게 404
  (findBySlugAndPublishedTrue).
- SecurityConfig에 /v1/activities/** permitAll 추가 — 기존 activity-categories와 동일하게
  공개 API라 인증이 필요 없다(추가하지 않으면 401).

검증: ./gradlew test 전체 통과 3회 연속. (참고: 3회차 실행 중 InitialSetupIntegrationTest가
자체 Testcontainers 컨테이너의 SSL 핸드셰이크 일시 오류로 한 번 실패했으나, 이 도메인과
무관한 기존 테스트이고 격리 재실행 시 바로 통과해 인프라성 flake로 판단했다.)
@ff1451

ff1451 commented Aug 19, 2026

Copy link
Copy Markdown
Author

Refs #28

@coderabbitai

coderabbitai Bot commented Aug 19, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 8e0bd024-5691-439d-becf-10afeb5899f9

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

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.

1 participant