[STORY-401] 라벨 목록 조회 API 응답 알림 설정 필드 추가 - #166
Conversation
📝 WalkthroughWalkthrough
Changes라벨 알림 정책 필드 추가
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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 |
There was a problem hiding this comment.
Pull request overview
라벨 목록/제안 목록 응답(LabelListResponse)에 알림 정책(notificationPolicy)을 포함시켜, 클라이언트가 목록 UI에서 라벨별 알림 동작을 함께 렌더링할 수 있도록 확장한 PR입니다.
Changes:
LabelListResponse에notificationPolicy필드를 추가하고Label#getNotificationPolicy()를 매핑- 라벨 목록 조회 Swagger 설명에 “알림 정책 포함”을 반영
LabelFacadeTest에서 목록 응답에notificationPolicy가 함께 반환되는지 검증 추가
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| core/src/main/java/com/mailsangja/core/dto/label/LabelListResponse.java | 라벨 목록 응답에 notificationPolicy 필드 추가 및 매핑 반영 |
| core/src/main/java/com/mailsangja/core/controller/docs/LabelControllerDocs.java | 라벨 목록 조회 API 설명에 알림 정책 포함 문구 추가 |
| core/src/test/java/com/mailsangja/core/facade/LabelFacadeTest.java | 목록 응답 매핑 테스트에 notificationPolicy 검증 및 테스트용 라벨 생성 헬퍼 확장 |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
core/src/main/java/com/mailsangja/core/controller/docs/LabelControllerDocs.java (1)
138-168: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value제안 엔드포인트 Swagger 설명에도 알림 정책 반영 고려.
PR 목적에 따르면
createSuggestions(Line 152)와getSuggestions(Line 166)도List<LabelListResponse>를 반환하므로 응답에notificationPolicy가 포함됩니다. 하지만 해당@Operation설명(Line 140, 158)에는 알림 정책 언급이 없어getLabels와 문서 일관성이 어긋납니다. 필요 시 설명을 보강해 주세요.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@core/src/main/java/com/mailsangja/core/controller/docs/LabelControllerDocs.java` around lines 138 - 168, Swagger 문서에서 createSuggestions와 getSuggestions의 응답 설명이 notificationPolicy 포함 여부를 반영하지 않아 getLabels와 문서 일관성이 어긋납니다. LabelControllerDocs의 `@Operation` 설명을 수정해 이 두 메서드가 반환하는 List<LabelListResponse>에 notificationPolicy가 포함된다는 점을 명시하고, createSuggestions/getSuggestions의 설명 문구를 동일한 정책 표현으로 맞춰 주세요.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In
`@core/src/main/java/com/mailsangja/core/controller/docs/LabelControllerDocs.java`:
- Around line 138-168: Swagger 문서에서 createSuggestions와 getSuggestions의 응답 설명이
notificationPolicy 포함 여부를 반영하지 않아 getLabels와 문서 일관성이 어긋납니다. LabelControllerDocs의
`@Operation` 설명을 수정해 이 두 메서드가 반환하는 List<LabelListResponse>에 notificationPolicy가
포함된다는 점을 명시하고, createSuggestions/getSuggestions의 설명 문구를 동일한 정책 표현으로 맞춰 주세요.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: c3815785-8589-4313-bf1d-368859fcfb80
📒 Files selected for processing (3)
core/src/main/java/com/mailsangja/core/controller/docs/LabelControllerDocs.javacore/src/main/java/com/mailsangja/core/dto/label/LabelListResponse.javacore/src/test/java/com/mailsangja/core/facade/LabelFacadeTest.java
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
🔗 관련 작업
👤 User Story
📌 Task
💡 작업 내용
notificationPolicy필드를 추가했습니다.📝 추가 설명
1. 라벨 목록 응답 필드 확장
LabelListResponse에NotificationPolicy notificationPolicy를 추가했습니다.LabelListResponse.of(...)에서Label#getNotificationPolicy()를 매핑합니다.rule필드는 상세 조회 전용으로 유지하고, 목록에서는 라벨 행/카드 렌더링에 필요한 알림 정책만 노출합니다.2. 라벨 제안 목록 영향
LabelListResponse는 라벨 목록뿐 아니라 라벨 제안 생성/목록 응답에도 사용됩니다.notificationPolicy를 생성하고 저장하므로, 제안 목록에서도 동일하게 알림 정책이 반환됩니다.GET /api/v1/labelsPOST /api/v1/labels/suggestionsGET /api/v1/labels/suggestions⚡️ Test 결과
./gradlew :test --tests "com.mailsangja.core.facade.LabelFacadeTest" --rerun-tasksBUILD SUCCESSFUL in 5s