From 541d2dab8044f7e5fd553dfa1e1640cf0aae81f2 Mon Sep 17 00:00:00 2001 From: marcosav Date: Wed, 10 Apr 2024 23:06:46 +0200 Subject: [PATCH] fix: add retrofit adapter --- build.gradle.kts | 1 + src/main/kotlin/com/gmail/marcosav2010/MFPSkillServlet.kt | 2 ++ 2 files changed, 3 insertions(+) diff --git a/build.gradle.kts b/build.gradle.kts index 5de6e34..3d91eb9 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -30,6 +30,7 @@ dependencies { implementation("com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:$jacksonVersion") implementation("com.fasterxml.jackson.module:jackson-module-kotlin:$jacksonVersion") implementation("com.squareup.retrofit2:retrofit:$retrofitVersion") + implementation("com.squareup.retrofit2:converter-jackson:$retrofitVersion") } tasks.test { diff --git a/src/main/kotlin/com/gmail/marcosav2010/MFPSkillServlet.kt b/src/main/kotlin/com/gmail/marcosav2010/MFPSkillServlet.kt index 447c264..b4a7246 100644 --- a/src/main/kotlin/com/gmail/marcosav2010/MFPSkillServlet.kt +++ b/src/main/kotlin/com/gmail/marcosav2010/MFPSkillServlet.kt @@ -10,6 +10,7 @@ import com.gmail.marcosav2010.handlers.LaunchHandler import com.gmail.marcosav2010.infrastructure.api.adapter.MFPApi import com.gmail.marcosav2010.infrastructure.api.connector.MFPConnector import retrofit2.Retrofit +import retrofit2.converter.jackson.JacksonConverterFactory import retrofit2.create import javax.servlet.annotation.WebServlet @@ -20,6 +21,7 @@ class MFPSkillServlet : SkillServlet(getSkill()) { private val clientConfig = Retrofit.Builder() .baseUrl(Configuration.mfpApiServerUrl) + .addConverterFactory(JacksonConverterFactory.create()) .build() private val connector = clientConfig.create()