Skip to content

Commit

Permalink
fix: ignore null values in Character#killedVBloods
Browse files Browse the repository at this point in the history
  • Loading branch information
DarkAtra committed May 29, 2024
1 parent 4f8c0d9 commit 1df6a6e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,7 @@ class BotCompanionClient {
.build()
}
}

fun main() {
BotCompanionClient().getCharacters("141.98.19.254", 25570, emptyList())
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
package de.darkatra.vrising.discord.clients.botcompanion.model

import com.fasterxml.jackson.annotation.JsonSetter
import com.fasterxml.jackson.annotation.Nulls

data class Character(
val name: String,
val gearLevel: Int,
val clan: String?,
@field:JsonSetter(contentNulls = Nulls.SKIP)
val killedVBloods: List<VBlood>
)
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ class BotCompanionClientTest {
"clan": "Test",
"killedVBloods": [
"FOREST_WOLF",
"BANDIT_STONEBREAKER"
"BANDIT_STONEBREAKER",
null
]
}
]""".trimIndent()
Expand Down

0 comments on commit 1df6a6e

Please sign in to comment.