You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My backend has a weird model defined. I can't really do anything about it. Moshi codegen breaks though.
@JsonClass(generateAdapter = true)
data class UserWrapper(
var id: Int? = 0,
var users: List<User?>? = listOf()
) {
@JsonClass(generateAdapter = true)
data class User(
var partnerUser: PartnerUser? = PartnerUser()
) {
@JsonClass(generateAdapter = true)
data class PartnerUser(
var isPartner: Boolean? = false,
var nestedUser: User? = User()
) {
@JsonClass(generateAdapter = true)
data class User(
var email: String? = ""
)
}
}
}
Switching to moshi reflect works fine though.
EDIT: I couldn't find a stacktrace because it complains about Dagger, and no matter how long I hunted through the stacktrace output I couldn't find anything related to moshi. Once I remove these annotations everything works.
The text was updated successfully, but these errors were encountered:
We built some handling for this in JavaPoet, seems like it's worth adding APIs for in KotlinPoet too. @ColtonIdle feel free to file an issue there. You can work around this by just not nesting your classes like that for now.
My backend has a weird model defined. I can't really do anything about it. Moshi codegen breaks though.
Switching to moshi reflect works fine though.
EDIT: I couldn't find a stacktrace because it complains about Dagger, and no matter how long I hunted through the stacktrace output I couldn't find anything related to moshi. Once I remove these annotations everything works.
The text was updated successfully, but these errors were encountered: