Repository navigation
♻️ 피드백 API의 Period를 AI 모듈 DTO에서 분리 - #50
Merged
Merged
Conversation
- domain.feedback.FeedbackPeriod(ROUND, WEEKLY, MONTHLY) 신설. API 요청·응답 값(문자열)은 그대로 - FeedbackController, PeriodFeedbackResponse, FeedbackService는 FeedbackPeriod를 사용 - AI 호출 직전 FeedbackService.toAiPeriod()에서 ai.dto.Period로 switch 변환, 응답용 역변환은 PeriodFeedbackResponse.fromAiPeriod()(둘 다 default 없는 exhaustive switch) - ai.dto.Period와 AI 모듈 파일(port 시그니처 포함)은 수정하지 않음 - 테스트: 양방향 매핑 누락/이름 일치/왕복, AI 포트로 변환된 값이 전달되는지 검증 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
개요
피드백 API(
GET /feedback/periodic)가 AI 모듈의ai.dto.Period를 직접 쓰고 있어서 API 계층과 AI 모듈이 묶여 있었습니다.처음에는
Period를 공통 패키지로 옮기려 했지만, 그러면 AI 모듈이global에 의존하고 port 시그니처도 바뀌어서 이동 대신 분리로 처리했습니다.변경 사항
domain.feedback.FeedbackPeriod(ROUND, WEEKLY, MONTHLY)FeedbackController,PeriodFeedbackResponse,FeedbackService가FeedbackPeriod사용ai.dto.Period, port 시그니처 그대로)FeedbackService.toAiPeriod()PeriodFeedbackResponse.fromAiPeriod()응답의
period가 AI 결과값에서 나오기 때문에, 응답이 달라지지 않도록 역변환도 추가했습니다.API 영향
없음. 요청과 응답 모두
ROUND/WEEKLY/MONTHLY문자열 그대로입니다.(기존 컨트롤러 테스트의
$.period값 검증과 잘못된 값 400 검증 통과)테스트
리뷰 요청
ai.dto.Period에 값을 추가하면 매핑 테스트가 깨지니까, 그때FeedbackPeriod도 같이 맞춰주면 돼.