From d03a2ad16cbac39c1a70d1522918f8607fd333d1 Mon Sep 17 00:00:00 2001 From: Artem Chepurnyi Date: Fri, 20 Dec 2024 21:01:59 +0200 Subject: [PATCH] fix(Sync): Specify default values for Domains entity #753 --- .../keyguard/provider/bitwarden/entity/DomainsEntity.kt | 7 +++++-- .../bitwarden/entity/GlobalEquivalentDomainEntity.kt | 8 ++++++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/common/src/commonMain/kotlin/com/artemchep/keyguard/provider/bitwarden/entity/DomainsEntity.kt b/common/src/commonMain/kotlin/com/artemchep/keyguard/provider/bitwarden/entity/DomainsEntity.kt index 346a6c1d..7773fbdb 100644 --- a/common/src/commonMain/kotlin/com/artemchep/keyguard/provider/bitwarden/entity/DomainsEntity.kt +++ b/common/src/commonMain/kotlin/com/artemchep/keyguard/provider/bitwarden/entity/DomainsEntity.kt @@ -2,11 +2,14 @@ package com.artemchep.keyguard.provider.bitwarden.entity import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable +import kotlinx.serialization.json.JsonNames @Serializable data class DomainsEntity( + @JsonNames("GlobalEquivalentDomains") @SerialName("globalEquivalentDomains") - val globalEquivalentDomains: List?, + val globalEquivalentDomains: List? = null, + @JsonNames("EquivalentDomains") @SerialName("equivalentDomains") - val equivalentDomains: List>?, + val equivalentDomains: List>? = null, ) diff --git a/common/src/commonMain/kotlin/com/artemchep/keyguard/provider/bitwarden/entity/GlobalEquivalentDomainEntity.kt b/common/src/commonMain/kotlin/com/artemchep/keyguard/provider/bitwarden/entity/GlobalEquivalentDomainEntity.kt index 7ac94124..97bc1ef0 100644 --- a/common/src/commonMain/kotlin/com/artemchep/keyguard/provider/bitwarden/entity/GlobalEquivalentDomainEntity.kt +++ b/common/src/commonMain/kotlin/com/artemchep/keyguard/provider/bitwarden/entity/GlobalEquivalentDomainEntity.kt @@ -2,13 +2,17 @@ package com.artemchep.keyguard.provider.bitwarden.entity; import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable +import kotlinx.serialization.json.JsonNames @Serializable data class GlobalEquivalentDomainEntity( + @JsonNames("Excluded") @SerialName("excluded") - val excluded: Boolean, + val excluded: Boolean = false, + @JsonNames("Domains") @SerialName("domains") - val domains: List?, + val domains: List? = null, + @JsonNames("Type") @SerialName("type") val type: Int, )