T-16 활동 공개 API - #70
Open
ff1451 wants to merge 1 commit into
Open
Conversation
- 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로 판단했다.)
Author
|
Refs #28 |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
요약
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).CurriculumQueryService와 같은 방식으로 N+1을 명시적으로 피했다 — 활동 목록 1쿼리 + 이미지 IN절 배치 조회 1쿼리, 연도/그룹 수와 무관하게 쿼리 수 고정.놓치기 쉬운 부분
SecurityConfig에/v1/activities/**permitAll을 추가했다. 빠뜨리면 공개 API인데도 401이 난다(실제로 처음 테스트 작성 시 이 문제로 전부 실패했다가 고쳤다).검증
./gradlew test전체 통과, 3회 연속 재실행.InitialSetupIntegrationTest(자체 Testcontainers 컨테이너)가 SSL 핸드셰이크 일시 오류로 한 번 실패했다. 격리 재실행 시 바로 통과해 인프라성 flake로 판단했다.남은 항목
Refs #28 (프로젝트), 브랜치는
feat/t15-activity-crud(#69) 위에 스택 — 앞선 T-14(#68)까지 함께 포함된 상태입니다.머지하지 않습니다. 부원 리뷰 후 직접 머지 예정입니다.