diff --git a/ktorfit-ksp/src/main/kotlin/de/jensklingenberg/ktorfit/model/FunctionData.kt b/ktorfit-ksp/src/main/kotlin/de/jensklingenberg/ktorfit/model/FunctionData.kt index 5ee18a35a..e7750edf1 100644 --- a/ktorfit-ksp/src/main/kotlin/de/jensklingenberg/ktorfit/model/FunctionData.kt +++ b/ktorfit-ksp/src/main/kotlin/de/jensklingenberg/ktorfit/model/FunctionData.kt @@ -207,7 +207,12 @@ fun KSFunctionDeclaration.toFunctionData( addImport("io.ktor.util.AttributeKey") } - if (it is Body || it is ParameterAnnotation.PartMap || it is ParameterAnnotation.Part) { + if (it is Body || + it is ParameterAnnotation.PartMap || + it is ParameterAnnotation.Part || + it is FieldMap || + it is Field + ) { addImport("io.ktor.client.request.setBody") }