Skip to content

[Refactor/#248] DTO Swagger ApiProperty 정리 및 Prettier 포맷 적용 - #249

Merged
yangwooyoung123 merged 1 commit into
developfrom
refactor/#248
Aug 12, 2026
Merged

[Refactor/#248] DTO Swagger ApiProperty 정리 및 Prettier 포맷 적용#249
yangwooyoung123 merged 1 commit into
developfrom
refactor/#248

Conversation

@yangwooyoung123

Copy link
Copy Markdown
Contributor

📌 관련 이슈번호

(Closes 키워드가 있어야 PR이 머지되었을 때 이슈가 자동으로 닫힌다)

📌 PR 유형

어떤 변경 사항이 있나요?

  • 새 기능 추가
  • 버그 수정
  • 리팩토링

📌 PR 요약

DTO Swagger ApiProperty 정리 및 Prettier 포맷 적용

📌 작업 세부 내용

  1. 스웨거 문서 별도 정리
  2. Prettier 포맷 적용

📸 스크린샷 (선택)

🔗 참고 자료

@yangwooyoung123 yangwooyoung123 self-assigned this Aug 12, 2026
@yangwooyoung123 yangwooyoung123 linked an issue Aug 12, 2026 that may be closed by this pull request
3 tasks
@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

일정 Swagger 문서를 전용 파일로 분리하고 컨트롤러에 적용했습니다. 일기 수정 요청에 이미지 배열 필드를 추가했습니다. AI·통계 DTO와 여러 서비스, 컨트롤러의 코드 형식을 정리했습니다.

Changes

일정 Swagger 문서 분리

Layer / File(s) Summary
일정 Swagger 스키마 및 엔드포인트 문서
src/schedules/schedule.swagger.ts
일정 API의 공통 응답, 오류, 요청, 반복 일정 및 엔드포인트별 Swagger 스키마를 추가했습니다.
일정 컨트롤러 문서 위임
src/schedules/schedule.controller.ts, src/schedules/schedule.swagger.ts
컨트롤러의 인라인 Swagger 설정을 제거하고 전용 데코레이터를 적용했습니다.

일기 DTO 및 코드 형식 정리

Layer / File(s) Summary
일기 DTO 및 수정 요청 문서
src/diaries/diary.dto.ts, src/diaries/diary.swagger.ts, src/diaries/diary.service.ts
DTO의 Swagger 메타데이터를 제거했습니다. 수정 요청 문서에 이미지 문자열 배열을 추가했습니다. 서비스 코드는 형식만 정리했습니다.
AI, 통계 및 공통 코드 형식 정리
src/ai/..., src/alarms/alarms.swagger.ts, src/categories/..., src/global/utills/date.utill.ts, src/stats/..., src/auth/entities/email-verification.entity.ts, src/schedules/entities/schedule.entity.ts
DTO 공백, import, 조건식, 주석, 엔티티 import, Swagger 설명 및 날짜 계산식의 형식을 정리했습니다.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

  • TEAM-DAILOG/BE#53: ScheduleController의 Swagger 문서가 처음 추가된 변경과 직접 연결됩니다.
  • TEAM-DAILOG/BE#170: 일기 DTO, 서비스 및 이미지 처리 영역이 겹칩니다.
  • TEAM-DAILOG/BE#197: 일정 생성 엔드포인트의 Swagger 요청·응답 문서가 겹칩니다.

Suggested reviewers: kimkimgungunwoo

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 44.44% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed 제목은 DTO Swagger 정리와 Prettier 포맷 적용이라는 주요 변경 사항을 명확하게 설명합니다.
Description check ✅ Passed 설명은 Swagger 문서 정리와 Prettier 포맷 적용 등 변경 사항을 기술합니다.
Linked Issues check ✅ Passed DTO Swagger 정리, Swagger 문서 분리, Prettier 적용 및 가독성 향상 목표를 변경 사항이 충족합니다.
Out of Scope Changes check ✅ Passed 변경 사항은 Swagger 문서 정리와 코드 포맷 개선 범위에 있으며, 관련 없는 기능 변경은 확인되지 않습니다.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refactor/#248

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
src/schedules/schedule.swagger.ts (1)

550-586: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

UpdateScheduleSwaggerdescription을 추가하세요.

다른 엔드포인트 데코레이터는 ApiOperationsummarydescription을 함께 제공합니다. UpdateScheduleSwaggersummary만 제공합니다. 이 엔드포인트는 scope 값에 따라 응답 형태가 달라집니다. 그 동작을 description에 설명하면 문서 품질이 일관됩니다.

♻️ 제안 변경
-    ApiOperation({ summary: '일정 수정' }),
+    ApiOperation({
+      summary: '일정 수정',
+      description:
+        '로그인한 사용자의 일정을 수정합니다. scope=SINGLE이면 선택한 일정만 수정하고, scope=ALL이면 동일한 반복 그룹 전체를 수정합니다. scope 값에 따라 응답 data 형태가 달라집니다.',
+    }),
🤖 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 `@src/schedules/schedule.swagger.ts` around lines 550 - 586, Update the
ApiOperation configuration in UpdateScheduleSwagger to include a description
explaining that the response varies according to the scope value, while
preserving the existing summary and decorator behavior.
🤖 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.

Inline comments:
In `@src/diaries/diary.swagger.ts`:
- Around line 147-151: Resolve the mismatch between the PATCH schema in
UpdateDiarySwagger and the updateDiary flow: either implement dto.images
replacement, deletion, and persistence according to the existing diary image
rules, or remove images from the PATCH Swagger schema if image updates are
unsupported. Verify the PATCH connection in the diary controller and keep the
documented API aligned with updateDiary behavior.

---

Nitpick comments:
In `@src/schedules/schedule.swagger.ts`:
- Around line 550-586: Update the ApiOperation configuration in
UpdateScheduleSwagger to include a description explaining that the response
varies according to the scope value, while preserving the existing summary and
decorator behavior.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 7aa5fdff-559f-4c9b-82de-9f798ec7111e

📥 Commits

Reviewing files that changed from the base of the PR and between d0763a2 and db8476a.

📒 Files selected for processing (21)
  • src/ai/dto/ai-answer.dto.ts
  • src/ai/dto/ai-diary-question.dto.ts
  • src/ai/dto/ai-question.dto.ts
  • src/ai/dto/ai-recommend.dto.ts
  • src/ai/entities/ai-recommend.entity.ts
  • src/ai/services/ai-question.service.ts
  • src/ai/services/ai-recommend.service.ts
  • src/alarms/alarms.swagger.ts
  • src/auth/entities/email-verification.entity.ts
  • src/categories/category.controller.ts
  • src/categories/entities/category.entity.ts
  • src/diaries/diary.dto.ts
  • src/diaries/diary.module.ts
  • src/diaries/diary.service.ts
  • src/diaries/diary.swagger.ts
  • src/global/utills/date.utill.ts
  • src/schedules/entities/schedule.entity.ts
  • src/schedules/schedule.controller.ts
  • src/schedules/schedule.swagger.ts
  • src/stats/stats.controller.ts
  • src/stats/stats.dto.ts
💤 Files with no reviewable changes (10)
  • src/ai/dto/ai-question.dto.ts
  • src/ai/dto/ai-diary-question.dto.ts
  • src/ai/dto/ai-answer.dto.ts
  • src/diaries/diary.module.ts
  • src/diaries/diary.dto.ts
  • src/ai/dto/ai-recommend.dto.ts
  • src/auth/entities/email-verification.entity.ts
  • src/schedules/entities/schedule.entity.ts
  • src/stats/stats.dto.ts
  • src/categories/entities/category.entity.ts

Comment thread src/diaries/diary.swagger.ts
@yangwooyoung123
yangwooyoung123 merged commit d0de20e into develop Aug 12, 2026
2 checks passed
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.

[Refactor] DTO Swagger ApiProperty 정리 및 Prettier 포맷 적용

1 participant