diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/enum_class.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/enum_class.mustache index 3a45715a03c..7d3793d57e5 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/enum_class.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/enum_class.mustache @@ -74,7 +74,7 @@ import kotlinx.serialization.* * This solves a problem when the variable name and its value are different, and ensures that * the client sends the correct enum values to the server always. */ - override fun toString(): String = value{{^isString}}.toString(){{/isString}} + override fun toString(): kotlin.String = value{{^isString}}.toString(){{/isString}} companion object { /** diff --git a/samples/client/petstore/kotlin-uppercase-enum/src/main/kotlin/org/openapitools/client/models/PetEnum.kt b/samples/client/petstore/kotlin-uppercase-enum/src/main/kotlin/org/openapitools/client/models/PetEnum.kt index f25afb05bf2..882b8ff106b 100644 --- a/samples/client/petstore/kotlin-uppercase-enum/src/main/kotlin/org/openapitools/client/models/PetEnum.kt +++ b/samples/client/petstore/kotlin-uppercase-enum/src/main/kotlin/org/openapitools/client/models/PetEnum.kt @@ -48,7 +48,7 @@ enum class PetEnum(val value: kotlin.String) { * This solves a problem when the variable name and its value are different, and ensures that * the client sends the correct enum values to the server always. */ - override fun toString(): String = value + override fun toString(): kotlin.String = value companion object { /**