eygraber
07/15/2021, 4:03 AMinterface StringId {
val raw: String
}
@JvmInline
value class MyId(override val raw: String) : StringId
is it safe to pass it to a Retrofit function?
interface MyApiEndpoints {
@GET("/fetch/{id}")
suspend fun fetch(@Path("id") id: MyId): Response<JsonObject>
}
https://stackoverflow.com/questions/68232128/is-it-safe-to-pass-a-kotlin-inline-class-to-a-retrofit-functionBenoit Quenaudon
07/15/2021, 12:22 PMeygraber
07/15/2021, 3:52 PMeygraber
07/15/2021, 3:53 PMephemient
07/17/2021, 7:53 AMephemient
07/17/2021, 7:53 AM