diff --git a/generator/openapi/src/main/kotlin/com/expediagroup/sdk/generators/openapi/Discriminator.kt b/generator/openapi/src/main/kotlin/com/expediagroup/sdk/generators/openapi/Discriminator.kt index 641ec5d33..9db2803c9 100644 --- a/generator/openapi/src/main/kotlin/com/expediagroup/sdk/generators/openapi/Discriminator.kt +++ b/generator/openapi/src/main/kotlin/com/expediagroup/sdk/generators/openapi/Discriminator.kt @@ -27,7 +27,7 @@ internal fun getParentDiscriminator(model: CodegenModel): MutableList mappedModel.modelName.equals(model.classname) }!!.mappingName, + it.mappedModels.find { mappedModel -> mappedModel.modelName.equals(model.classname) }!!.mappingName.uppercase(), model.parentModel.name, variable.isEnum, variable.isString