Skip to content

Commit 4dd54e9

Browse files
committed
Enable descriminator for kotlin-client multiplatform
1 parent d06ed32 commit 4dd54e9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinClientCodegen.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -966,7 +966,7 @@ public ModelsMap postProcessModels(ModelsMap objs) {
966966
@Override
967967
public Map<String, ModelsMap> postProcessAllModels(Map<String, ModelsMap> objs) {
968968
objs = super.postProcessAllModels(objs);
969-
if (getSerializationLibrary() == SERIALIZATION_LIBRARY_TYPE.kotlinx_serialization) {
969+
if (getSerializationLibrary() == SERIALIZATION_LIBRARY_TYPE.kotlinx_serialization || getLibrary().equals(MULTIPLATFORM)) {
970970
// The loop removes unneeded variables so commas are handled correctly in the related templates
971971
for (Map.Entry<String, ModelsMap> modelsMap : objs.entrySet()) {
972972
for (ModelMap mo : modelsMap.getValue().getModels()) {

0 commit comments

Comments
 (0)