Skip to content

Commit 64ce1af

Browse files
code review feedback; provide comment for generated EnumConverterConfiguration.kt
1 parent 9a6a0b5 commit 64ce1af

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

modules/openapi-generator/src/main/resources/kotlin-spring/converter.mustache

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@ import org.springframework.context.annotation.Bean
1212
import org.springframework.context.annotation.Configuration
1313
import org.springframework.core.convert.converter.Converter
1414

15+
/**
16+
* This class provides Spring Converter beans for the enum models in the OpenAPI specification.
17+
*
18+
* By default, Spring only converts primitive types to enums using Enum::valueOf, which can prevent
19+
* correct conversion if the OpenAPI specification is using an `enumPropertyNaming` other than
20+
* `original` or the specification has an integer enum.
21+
*/
1522
@Configuration(value = "{{configPackage}}.enumConverterConfiguration")
1623
class EnumConverterConfiguration {
1724

0 commit comments

Comments
 (0)