Skip to content

코스 추가 시 CourseCreateWebRequest 리팩토링#848

Merged
choizz156 merged 1 commit intomainfrom
refactor/847-coordinate-web-request
Apr 27, 2026
Merged

코스 추가 시 CourseCreateWebRequest 리팩토링#848
choizz156 merged 1 commit intomainfrom
refactor/847-coordinate-web-request

Conversation

@choizz156
Copy link
Copy Markdown
Collaborator

@choizz156 choizz156 commented Apr 22, 2026

🛠️ 설명

코스 생성 API의 좌표 입력(dto)이 List<List> -> List로 형식을 통일했습니다.

변경 전

"coordinates": [[37.5, 127.1], [37.6, 127.2]]

변경 후

"coordinates": [
  {"latitude": 37.5, "longitude": 127.1},
  {"latitude": 37.6, "longitude": 127.2}
]

🔗 관련 이슈

Summary by CodeRabbit

릴리스 노트

  • 버그 수정
    • 코스 생성 시 좌표 검증이 강화되어 더욱 정확한 데이터 처리를 제공합니다.

@choizz156 choizz156 self-assigned this Apr 22, 2026
@choizz156 choizz156 added refactor 기존 기능 수정 backend D-2 labels Apr 22, 2026
@github-actions github-actions Bot added D-2 and removed D-2 labels Apr 22, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 22, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 75f4bd71-fffb-4dfd-aa90-3d89a7376131

📥 Commits

Reviewing files that changed from the base of the PR and between 0c635c0 and 0befcb9.

📒 Files selected for processing (1)
  • backend/src/main/java/coursepick/coursepick/presentation/dto/CourseCreateWebRequest.java

Walkthrough

CourseCreateWebRequest 클래스의 좌표(coordinates) 필드에 대한 검증 방식을 개선했습니다. 기존의 중첩된 List<List<Double>> 구조에서 CoordinateWebRequest 객체 리스트로 변경하여 요소 수준의 빈 검증을 적용했습니다.

Changes

Cohort / File(s) Summary
좌표 DTO 검증 개선
backend/src/main/java/coursepick/coursepick/presentation/dto/CourseCreateWebRequest.java
coordinates 필드 타입을 List<List<Double>>에서 List<@NotNull(...) @Valid CoordinateWebRequest>로 변경하여 개별 좌표 객체에 대한 검증을 강화했습니다. toCoordinates() 메서드는 CoordinateWebRequest::toCoordinate를 사용한 변환 로직으로 수정되었습니다.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% 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 제목이 PR의 주요 변경 사항인 좌표 DTO 구조 변경을 명확하게 설명합니다.
Description check ✅ Passed PR 설명이 변경 전후 예시와 함께 변경 사항을 명확히 설명하며, 관련 이슈를 명시합니다.
Linked Issues check ✅ Passed 코드 변경이 이슈 #847의 요구사항인 좌표 DTO를 List<List>에서 List로 변경하는 작업을 완전히 충족합니다.
Out of Scope Changes check ✅ Passed 모든 코드 변경이 좌표 DTO 리팩토링이라는 이슈 #847의 요구사항 범위 내에 있습니다.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refactor/847-coordinate-web-request

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 and usage tips.

@github-actions github-actions Bot added OVER-DUE and removed D-Day labels Apr 25, 2026
@choizz156 choizz156 merged commit 2177c3c into main Apr 27, 2026
9 checks passed
@choizz156 choizz156 deleted the refactor/847-coordinate-web-request branch April 27, 2026 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

코스 추가 dto 수정

2 participants