fix import mapping for JsonValue (#11216)

This commit is contained in:
William Cheng 2022-01-03 17:05:38 +08:00 committed by GitHub
parent 6397421399
commit 15b228c3ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -541,10 +541,12 @@ public class KotlinSpringServerCodegen extends AbstractKotlinCodegen
.forEach(cm -> { .forEach(cm -> {
cm.imports.add(importMapping.get("JsonValue")); cm.imports.add(importMapping.get("JsonValue"));
cm.imports.add(importMapping.get("JsonProperty")); cm.imports.add(importMapping.get("JsonProperty"));
Map<String, String> item = new HashMap<>(); Map<String, String> itemJsonValue = new HashMap<>();
item.put("import", importMapping.get("JsonValue")); itemJsonValue.put("import", importMapping.get("JsonValue"));
item.put("import", importMapping.get("JsonProperty")); imports.add(itemJsonValue);
imports.add(item); Map<String, String> itemJsonProperty = new HashMap<>();
itemJsonProperty.put("import", importMapping.get("JsonProperty"));
imports.add(itemJsonProperty);
}); });
return objs; return objs;