-
Notifications
You must be signed in to change notification settings - Fork 0
feat: 도서 상세 API 변경 사항 반영 및 V2 suffix 제거 #253
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
WalkthroughReadingRecordModelV2를 ReadingRecordModel로 통합하고 관련 네트워크/모델/매퍼/UI를 V2 API 스펙(대표 감정(primaryEmotion), detailEmotions, nullable pageNumber)으로 맞춤; 다수의 안정성(stability) 덤프 및 일부 유틸/컴포저블(감정 분석 관련) 제거 및 Emotion → EmotionCode/PrimaryEmotion 모델 전환이 포함됩니다. Changes
Sequence Diagram(s)sequenceDiagram
participant UI as UI (Presenter/Composables)
participant Repo as RecordRepository
participant Service as ReedService (Retrofit)
participant Network as Network (HTTP)
participant Mapper as ResponseToModel
UI->>Repo: 요청 (post/get/edit) with model (primaryEmotion, detailEmotions, pageNumber?)
Repo->>Service: 호출 (api/v2/reading-records or record detail)
Service->>Network: HTTP request
Network-->>Service: HTTP response (ReadingRecordV2 / ReadingRecord with PrimaryEmotion)
Service-->>Repo: raw response object
Repo->>Mapper: response.toModel()
Mapper-->>Repo: ReadingRecordModel (primaryEmotion, detailEmotions, pageNumber nullable)
Repo-->>UI: Result<ReadingRecordModel>
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 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 |
대표 감정을 representativeEmotion으로 내려주는 관계로, 네이티브 코드내에서 대표 감정을 선출하는 로직 제거
각 Emotion 네이밍 warmth, joy, sadness, insight, other로 통일(리소스 네이밍 수정)
사용하지 않는 dto 클래스 제거
누락된 model 모듈 @stable -> @immutable 추가 적용
@seoyoon513 이거 생각해보니, 화면내에 모든 기록들은 같은 도서 정보를 가지고 있으므로 도서 상세화면 진입시 받아온 도서 정보를 매핑해서 문제 해결할 수 있었습니다. 해당 커밋의 방법처럼 fallback 처리만 적용하면 문제 없이 정상 동작하여 작업 마무리 했습니다! 0575085 |
|
@easyhooon /seed/stats API에서 기타 감정 개수가 내려오지 않는 것 같은데 확인 된 부분일까요? {
"categories": [
{
"name": "따뜻함",
"count": 0
},
{
"name": "즐거움",
"count": 2
},
{
"name": "슬픔",
"count": 2
},
{
"name": "깨달음",
"count": 0
}
]
} |
| @Serializable | ||
| data class ReadingRecordsResponse( | ||
| @SerialName("representativeEmotion") | ||
| val representativeEmotion: PrimaryEmotion, |
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.
기록 없이 책만 등록했을 때, 해당 필드 null로 내려와서 null 체크 필요할 것 같습니다~!
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.
아 그렇겠네요. 기록이 없을때가 있군요
🔗 관련 이슈
📙 작업 설명
@Stable->@Immutable로 어노테이션 적용 변경🧪 테스트 내역 (선택)
📸 스크린샷 또는 시연 영상 (선택)
💬 추가 설명 or 리뷰 포인트 (선택)
@Stable->@Immutable로 변경했습니다. 이전에 개발시엔 이 두 어노테이션의 차이를 잘 몰라서,@Immutable사용이 조심스러워 사용하지 않았으나, 이제는 사용해도 된다고 판단하였습니다.Summary by CodeRabbit
릴리스 노트
New Features
Bug Fixes
Refactor
✏️ Tip: You can customize this high-level summary in your review settings.