From 9e7898887bd7e8ff66dbb43074a07b8d05182c90 Mon Sep 17 00:00:00 2001 From: Andrei Mukamolau <4471821+fobo66@users.noreply.github.com> Date: Sat, 16 Nov 2024 18:41:57 +0200 Subject: [PATCH] Add default values to the API model --- .../kotlin/dev/fobo66/factcheckerassistant/api/models/Claim.kt | 2 +- .../fobo66/factcheckerassistant/api/models/FactCheckResponse.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/kotlin/dev/fobo66/factcheckerassistant/api/models/Claim.kt b/app/src/main/kotlin/dev/fobo66/factcheckerassistant/api/models/Claim.kt index 98d31cf7..98fa76be 100644 --- a/app/src/main/kotlin/dev/fobo66/factcheckerassistant/api/models/Claim.kt +++ b/app/src/main/kotlin/dev/fobo66/factcheckerassistant/api/models/Claim.kt @@ -12,7 +12,7 @@ import kotlinx.serialization.Serializable @Immutable @Parcelize data class Claim( - val text: String, + val text: String? = null, val claimant: String? = null, @TypeParceler() val claimDate: Instant? = null, val claimReview: List = emptyList() diff --git a/app/src/main/kotlin/dev/fobo66/factcheckerassistant/api/models/FactCheckResponse.kt b/app/src/main/kotlin/dev/fobo66/factcheckerassistant/api/models/FactCheckResponse.kt index 91e68c4d..18184286 100644 --- a/app/src/main/kotlin/dev/fobo66/factcheckerassistant/api/models/FactCheckResponse.kt +++ b/app/src/main/kotlin/dev/fobo66/factcheckerassistant/api/models/FactCheckResponse.kt @@ -3,4 +3,4 @@ package dev.fobo66.factcheckerassistant.api.models import kotlinx.serialization.Serializable @Serializable -data class FactCheckResponse(val claims: List?, val nextPageToken: String?) +data class FactCheckResponse(val claims: List? = null, val nextPageToken: String? = null)