From 266a55d9e48460012e31802e87ad86f68b90afd7 Mon Sep 17 00:00:00 2001 From: Csaba Kozak Date: Mon, 16 Sep 2024 10:59:20 +0200 Subject: [PATCH] [kotlin-client][multiplatform] add support for kotlinx.datetime.LocalTime --- .../openapitools/codegen/languages/KotlinClientCodegen.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinClientCodegen.java index 6984956674a4e..ddc478ca63081 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinClientCodegen.java @@ -583,12 +583,15 @@ private void processKotlinxDate() { typeMapping.put("date-time", "Instant"); typeMapping.put("date", "LocalDate"); + typeMapping.put("time", "LocalTime"); typeMapping.put("DateTime", "Instant"); typeMapping.put("Date", "LocalDate"); + typeMapping.put("Time", "LocalTime"); importMapping.put("Instant", "kotlinx.datetime.Instant"); importMapping.put("LocalDate", "kotlinx.datetime.LocalDate"); + importMapping.put("LocalTime", "kotlinx.datetime.LocalTime"); } private void processJVMRetrofit2Library(String infrastructureFolder) {