-
Notifications
You must be signed in to change notification settings - Fork 0
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
미션 상태 - 인원 미달, 종료 대기 대응 #73
base: dev
Are you sure you want to change the base?
Conversation
enum class MissionStatusResponse { | ||
CREATED, | ||
CANCELED, | ||
IN_PROGRESS, | ||
DELETED, | ||
PENDING_COMPLETION, | ||
COMPLETED | ||
} |
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.
enum을 리스폰스로 받거나 리퀘스트로 json 파싱해서 넘겨줄 때 SerializedName 쓰거나 JsonAdapter 사용하는 방식도 있는데, 우리가 kotlin-serialize 사용하고 있어서 그 방법으로는 못하는거야?
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.
못한다기보다는 안 써도 되는 형태라고 봐야하지 않을까 싶어! https://github.com/Kotlin/kotlinx.serialization/blob/master/docs/builtin-classes.md#enum-classes
보면 enum class name이랑 동일한 경우 그대로 사용해도 되고 다른 경우에는 @SerialName 를 통해 지정을 해도 되는 형태인 것 같아.
필드값으로 들어가는 enum class 에 대해서는 @serializable annotation을 안 써도 되는지에 대해서 확실하게 몰랐는데 공식 가이드에서 안 써도 된다고 적혀있네!
…atus # Conflicts: # core/data/mission/src/main/java/com/goalpanzi/mission_mate/core/board/repository/MissionRepositoryImpl.kt # core/domain/mission/src/main/java/com/goalpanzi/mission_mate/core/domain/mission/repository/MissionRepository.kt # core/network/src/main/java/com/goalpanzi/mission_mate/core/network/service/MissionService.kt
주요 내용