mirror of
https://github.com/ouchadam/small-talk.git
synced 2025-02-17 20:50:48 +01:00
ignoring nulls unless explicitly declared in the api models, passing null breaks some endpoints
This commit is contained in:
parent
2486a1eef6
commit
418fa46346
@ -3,6 +3,7 @@ package app.dapk.st.matrix.http
|
|||||||
import io.ktor.client.utils.*
|
import io.ktor.client.utils.*
|
||||||
import io.ktor.http.content.*
|
import io.ktor.http.content.*
|
||||||
import io.ktor.util.reflect.*
|
import io.ktor.util.reflect.*
|
||||||
|
import kotlinx.serialization.ExperimentalSerializationApi
|
||||||
import kotlinx.serialization.json.Json
|
import kotlinx.serialization.json.Json
|
||||||
|
|
||||||
interface MatrixHttpClient {
|
interface MatrixHttpClient {
|
||||||
@ -47,7 +48,11 @@ interface MatrixHttpClient {
|
|||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
val json = Json
|
val json = Json
|
||||||
val jsonWithDefaults = Json { encodeDefaults = true }
|
@OptIn(ExperimentalSerializationApi::class)
|
||||||
|
val jsonWithDefaults = Json {
|
||||||
|
encodeDefaults = true
|
||||||
|
explicitNulls = false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun interface Factory {
|
fun interface Factory {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user