[Feat] Dto Mapper 및 Datasource, Repository 구현체 추가 - #85
Draft
oungsi2000 wants to merge 4 commits into
Draft
Conversation
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
단일 파일(`ChatMapper.kt`)에 모여있던 매핑 로직을 각 DTO 파일의 확장 함수로 분산하여 응집도를 높이고, 여러 DTO에서 사용하는 날짜 파싱 로직을 `ToInstantOrThrow.kt` 유틸리티로 추출한다. SSE(Server-Sent Events) 처리 시 `error` 이벤트가 발생하면 `ChatStreamException`을 던지는 대신 `ChatStreamEvent.Error` 도메인 모델을 반환하도록 변경한다. 이를 통해 스트림 처리 도중 예외가 발생하여 Flow가 갑자기 종료되는 것을 방지하고 호출부에서 에러 이벤트를 명시적으로 처리할 수 있게 한다. 그 외 `ChatAction`의 타입을 문자열에서 `ChatActionType` enum으로 변경하여 타입 안정성을 강화한다.
서버 응답에서 category 필드가 누락되거나 null로 내려오는 경우에 대응하여 직렬화 오류를 방지하기 위해 타입을 String?로 변경한다.
ChatSuggestionResponse의 문자열 category를 도메인 모델인 ChatCategory로 변환한다. null인 경우 처리를 추가하고, valueOf를 통해 String을 Enum 타입으로 매핑하도록 수정한다.
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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 |
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.
관련 이슈
#76
작업 내용
변경사항 / 상세
중점 리뷰사항
스크린샷 (선택)