From 707c973c002255ca1501fbc97e50471363cfd41d Mon Sep 17 00:00:00 2001 From: usbharu <64310155+usbharu@users.noreply.github.com> Date: Thu, 30 Mar 2023 19:22:44 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20context=E3=81=AE=E9=85=8D=E5=88=97?= =?UTF-8?q?=E3=81=AB=E3=82=AA=E3=83=96=E3=82=B8=E3=82=A7=E3=82=AF=E3=83=88?= =?UTF-8?q?=E3=81=8C=E6=B7=B7=E3=81=96=E3=81=A3=E3=81=9F=E9=9A=9B=E3=81=AB?= =?UTF-8?q?=E3=83=91=E3=83=BC=E3=82=B9=E3=81=A7=E3=81=8D=E3=82=8B=E3=82=88?= =?UTF-8?q?=E3=81=86=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/kotlin/dev/usbharu/hideout/Application.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/dev/usbharu/hideout/Application.kt b/src/main/kotlin/dev/usbharu/hideout/Application.kt index 6a16a761..6526f6ba 100644 --- a/src/main/kotlin/dev/usbharu/hideout/Application.kt +++ b/src/main/kotlin/dev/usbharu/hideout/Application.kt @@ -1,6 +1,7 @@ package dev.usbharu.hideout import com.fasterxml.jackson.annotation.JsonInclude +import com.fasterxml.jackson.core.JsonGenerator import com.fasterxml.jackson.databind.DeserializationFeature import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper import dev.usbharu.hideout.config.Config @@ -38,7 +39,7 @@ fun Application.module() { url = environment.config.propertyOrNull("hideout.url")?.getString() ?: environment.config.property("hideout.hostname").getString(), objectMapper = jacksonObjectMapper().enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY) - .setSerializationInclusion(JsonInclude.Include.NON_EMPTY) + .setSerializationInclusion(JsonInclude.Include.NON_EMPTY).configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES,false) ) } single { HttpClient(CIO) }