Conversation
개요GraduationUserSummaryResponse에 advisor 필드를 추가하고, 이를 GraduationUserSummaryPageResponse의 JSON 예제 페이로드에 반영하는 변경사항입니다. 변경사항
예상 코드 리뷰 노력🎯 2 (Simple) | ⏱️ ~8 분 관련 이슈
추천 리뷰어
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
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 |
Test Coverage Report
|
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## develop #323 +/- ##
==========================================
Coverage 87.25% 87.25%
Complexity 67 67
==========================================
Files 24 24
Lines 259 259
Branches 14 14
==========================================
Hits 226 226
Misses 21 21
Partials 12 12 Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In
`@aics-admin/src/main/java/kgu/developers/admin/graduationUser/presentation/response/GraduationUserSummaryResponse.java`:
- Around line 30-31: The response field advisor in GraduationUserSummaryResponse
is marked required but populated from a nullable advisorProfessor, causing a
schema contract violation; fix by making the mapping null-safe (preferred):
ensure the DTO sets advisor = advisorProfessor != null ? advisorProfessor : "정보
없음" (or another sensible default) when constructing
GraduationUserSummaryResponse (or via its builder/constructor), alternatively
add `@NotNull/NOT` NULL to the domain field advisorProfessor or change the
`@Schema`(requiredMode) to NOT_REQUIRED — pick one of these and apply consistently
so advisor never violates the declared required contract.
🧹 Nitpick comments (1)
aics-admin/src/main/java/kgu/developers/admin/graduationUser/presentation/response/GraduationUserSummaryPageResponse.java (1)
20-20: JSON 예시 문자열의 포맷팅 일관성기존 코드는 쉼표 뒤에 공백을 포함하는 패턴(
, ")을 사용하고 있으나, 새로 추가된 라인은 공백 없이(,") 작성되어 있습니다. 기능에는 영향이 없지만, 일관성을 위해 수정을 권장합니다.♻️ 포맷팅 일관성을 위한 수정 제안
- + "\"advisor\": \"김교수\"," + + "\"advisor\": \"김교수\", "Line 31도 동일하게 수정:
- + "\"advisor\": \"이순신\"," + + "\"advisor\": \"이순신\", "
| @Schema(description = "지도교수", example = "김교수", requiredMode = REQUIRED) | ||
| String advisor, |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
find . -type f -name "GraduationUserSummaryResponse.java" | head -5Repository: kgu-developers/aics-server
Length of output: 189
🏁 Script executed:
find . -type f -name "GraduationUser.java" | grep -E "(entity|domain)" | head -5Repository: kgu-developers/aics-server
Length of output: 161
🏁 Script executed:
rg -n "class GraduationUserSummaryResponse" -A 80 --type=javaRepository: kgu-developers/aics-server
Length of output: 52
🏁 Script executed:
cat -n ./aics-admin/src/main/java/kgu/developers/admin/graduationUser/presentation/response/GraduationUserSummaryResponse.javaRepository: kgu-developers/aics-server
Length of output: 3100
🏁 Script executed:
cat -n ./aics-domain/src/main/java/kgu/developers/domain/graduationUser/domain/GraduationUser.javaRepository: kgu-developers/aics-server
Length of output: 2605
advisor REQUIRED인데 null 가능성으로 인한 스키마 계약 위반
advisorProfessor는 null 제약이 없는 순수 String 필드인데, 스키마는 requiredMode = REQUIRED로 선언되어 있습니다. 따라서 advisorProfessor가 null이면 API 응답이 REQUIRED 계약을 위반합니다.
다음 중 하나로 정리해주세요:
- DB/도메인 레벨에서 advisorProfessor에
@NotNull또는 NOT NULL 제약 추가 - null-safe 기본값 처리 (라인 63의 graduationType처럼)
- requiredMode를 완화 (NOT_REQUIRED 또는 제거)
✅ null-safe 기본값 예시 (권장)
- .advisor(graduationUser.getAdvisorProfessor())
+ .advisor(graduationUser.getAdvisorProfessor() != null
+ ? graduationUser.getAdvisorProfessor()
+ : "미정")🤖 Prompt for AI Agents
In
`@aics-admin/src/main/java/kgu/developers/admin/graduationUser/presentation/response/GraduationUserSummaryResponse.java`
around lines 30 - 31, The response field advisor in
GraduationUserSummaryResponse is marked required but populated from a nullable
advisorProfessor, causing a schema contract violation; fix by making the mapping
null-safe (preferred): ensure the DTO sets advisor = advisorProfessor != null ?
advisorProfessor : "정보 없음" (or another sensible default) when constructing
GraduationUserSummaryResponse (or via its builder/constructor), alternatively
add `@NotNull/NOT` NULL to the domain field advisorProfessor or change the
`@Schema`(requiredMode) to NOT_REQUIRED — pick one of these and apply consistently
so advisor never violates the declared required contract.
Summary
졸업 대상자 페이징 조회 API 호출 시 지도교수 필드가 함께 전달되도록 수정했습니다.
Tasks