-
Notifications
You must be signed in to change notification settings - Fork 1
refactor/KD-59 : 일정 반환 enum을 한글로 보내주도록 수정했습니다. #309
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
개요두 개의 일정 응답 클래스에서 submissionType 필드의 데이터 반환 방식을 변경했습니다. Swagger 예시 값은 영문 열거형명("MIDTHESIS")에서 한글 레이블("중간논문")로 업데이트되었으며, from() 팩토리 메서드는 enum의 name() 메서드 대신 getLabel() 메서드를 사용하도록 변경되었습니다. 변경 사항
예상 코드 리뷰 소요 시간🎯 2 (단순) | ⏱️ ~8분 Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ 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 #309 +/- ##
==========================================
Coverage 86.51% 86.51%
Complexity 67 67
==========================================
Files 24 24
Lines 267 267
Branches 14 14
==========================================
Hits 231 231
Misses 24 24
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
aics-api/src/main/java/kgu/developers/api/schedule/presentation/response/ScheduleSummaryResponse.javaaics-api/src/main/java/kgu/developers/api/schedule/presentation/response/ScheduleTypeContentResponse.java
🔇 Additional comments (2)
aics-api/src/main/java/kgu/developers/api/schedule/presentation/response/ScheduleSummaryResponse.java (1)
18-18: 변경 사항이 일관되게 적용되었습니다.
ScheduleTypeContentResponse와 동일하게submissionType필드가 enum 상수 대신 한글 레이블을 반환하도록 올바르게 수정되었습니다.Also applies to: 37-37
aics-api/src/main/java/kgu/developers/api/schedule/presentation/response/ScheduleTypeContentResponse.java (1)
11-11: 변경 사항이 PR 목표와 일치합니다.Swagger 예제와 실제 반환 값이 모두 한글 문자열("중간논문")을 사용하도록 올바르게 수정되었습니다.
SubmissionTypeenum의@Getter어노테이션으로 자동 생성된getLabel()메서드를 통해 enum 상수 대신 레이블을 반환하며, 스키마 예제와 실제 enum 값이 일치합니다.
| .submissionType(schedule.getSubmissionType().getLabel()) | ||
| .startDate(schedule.getStartDate().format(DATE_FORMATTER)) | ||
| .endDate(schedule.getEndDate().format(DATE_FORMATTER)) | ||
| .status(schedule.determineStatusAt(referenceTime).name()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# First, locate the ScheduleSummaryResponse file
find . -name "ScheduleSummaryResponse.java" -type f
# Also find ScheduleStatus enum
find . -name "ScheduleStatus.java" -type fRepository: kgu-developers/aics-server
Length of output: 259
🏁 Script executed:
#!/bin/bash
# Search for the ScheduleSummaryResponse and ScheduleStatus files
fd -e java "ScheduleSummaryResponse|ScheduleStatus" -x wc -lRepository: kgu-developers/aics-server
Length of output: 265
🏁 Script executed:
#!/bin/bash
# Let's search in the typical API structure
find aics-api -name "*.java" | grep -i schedule | head -20Repository: kgu-developers/aics-server
Length of output: 639
🏁 Script executed:
cat -n aics-api/src/main/java/kgu/developers/api/schedule/presentation/response/ScheduleSummaryResponse.javaRepository: kgu-developers/aics-server
Length of output: 2046
🏁 Script executed:
cat -n aics-domain/src/main/java/kgu/developers/domain/schedule/domain/ScheduleStatus.javaRepository: kgu-developers/aics-server
Length of output: 440
status 필드를 getLabel()로 변경하여 API 응답 일관성을 확보하세요.
submissionType은 getLabel()을 사용하여 한글로 반환하고 있으나, status 필드는 여전히 .name()을 사용하여 enum 상수를 반환하고 있습니다.
ScheduleStatus 열거형에 이미 getLabel() 메서드가 있으며 한글 레이블("대기", "진행 중", "마감")을 제공하고 있습니다. 40번 줄을 다음과 같이 수정하여 일관성을 맞춰주세요:
.status(schedule.determineStatusAt(referenceTime).getLabel())
이를 통해 API 응답에서 두 필드 모두 의미있는 한글 값을 반환하게 되며, 스키마의 설명("상태(대기/진행/마감)")과도 일치하게 됩니다.
🤖 Prompt for AI Agents
In
aics-api/src/main/java/kgu/developers/api/schedule/presentation/response/ScheduleSummaryResponse.java
around line 40, the status field is using .name() which returns the enum
constant; change it to call .getLabel() on
schedule.determineStatusAt(referenceTime) so the API returns the Korean label
(대기/진행 중/마감) consistent with submissionType and the schema description.
JangYeongHu
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ScheduleListResponse의 submissionType도 수정이 필요해 보입니다
그리고 코드래빗 리뷰대로 일관성 있게 둘 다 한글 값을 반환하도록 만드는 것도 좋아 보입니다
그 외에는 잘 해주셨네요 수고하셨습니다~!
Summary
해당 PR에 대한 요약을 작성해주세요.
일정 타입을 반환할때 enum이 아닌 한글로 반환해주도록 설계하였습니다.
Tasks