diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/converter.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/converter.mustache index ec7471528774..4578768ddda3 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/converter.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/converter.mustache @@ -12,6 +12,13 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.core.convert.converter.Converter; +/** + * This class provides Spring Converter beans for the enum models in the OpenAPI specification. + * + * By default, Spring only converts primitive types to enums using Enum::valueOf, which can prevent + * correct conversion if the OpenAPI specification is using an `enumPropertyNaming` other than + * `original` or the specification has an integer enum. + */ @Configuration(value = "{{configPackage}}.enumConverterConfiguration") public class EnumConverterConfiguration { diff --git a/samples/openapi3/server/petstore/spring-boot-oneof-sealed/src/main/java/org/openapitools/configuration/EnumConverterConfiguration.java b/samples/openapi3/server/petstore/spring-boot-oneof-sealed/src/main/java/org/openapitools/configuration/EnumConverterConfiguration.java index 638061b124c5..cb1b70c02a8f 100644 --- a/samples/openapi3/server/petstore/spring-boot-oneof-sealed/src/main/java/org/openapitools/configuration/EnumConverterConfiguration.java +++ b/samples/openapi3/server/petstore/spring-boot-oneof-sealed/src/main/java/org/openapitools/configuration/EnumConverterConfiguration.java @@ -6,6 +6,13 @@ import org.springframework.context.annotation.Configuration; import org.springframework.core.convert.converter.Converter; +/** + * This class provides Spring Converter beans for the enum models in the OpenAPI specification. + * + * By default, Spring only converts primitive types to enums using Enum::valueOf, which can prevent + * correct conversion if the OpenAPI specification is using an `enumPropertyNaming` other than + * `original` or the specification has an integer enum. + */ @Configuration(value = "org.openapitools.configuration.enumConverterConfiguration") public class EnumConverterConfiguration { diff --git a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/configuration/EnumConverterConfiguration.java b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/configuration/EnumConverterConfiguration.java index 638061b124c5..cb1b70c02a8f 100644 --- a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/configuration/EnumConverterConfiguration.java +++ b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/configuration/EnumConverterConfiguration.java @@ -6,6 +6,13 @@ import org.springframework.context.annotation.Configuration; import org.springframework.core.convert.converter.Converter; +/** + * This class provides Spring Converter beans for the enum models in the OpenAPI specification. + * + * By default, Spring only converts primitive types to enums using Enum::valueOf, which can prevent + * correct conversion if the OpenAPI specification is using an `enumPropertyNaming` other than + * `original` or the specification has an integer enum. + */ @Configuration(value = "org.openapitools.configuration.enumConverterConfiguration") public class EnumConverterConfiguration { diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/configuration/EnumConverterConfiguration.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/configuration/EnumConverterConfiguration.java index 941171792aa5..9aebf5a18296 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/configuration/EnumConverterConfiguration.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/configuration/EnumConverterConfiguration.java @@ -7,6 +7,13 @@ import org.springframework.context.annotation.Configuration; import org.springframework.core.convert.converter.Converter; +/** + * This class provides Spring Converter beans for the enum models in the OpenAPI specification. + * + * By default, Spring only converts primitive types to enums using Enum::valueOf, which can prevent + * correct conversion if the OpenAPI specification is using an `enumPropertyNaming` other than + * `original` or the specification has an integer enum. + */ @Configuration(value = "org.openapitools.configuration.enumConverterConfiguration") public class EnumConverterConfiguration { diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/configuration/EnumConverterConfiguration.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/configuration/EnumConverterConfiguration.java index 941171792aa5..9aebf5a18296 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/configuration/EnumConverterConfiguration.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/configuration/EnumConverterConfiguration.java @@ -7,6 +7,13 @@ import org.springframework.context.annotation.Configuration; import org.springframework.core.convert.converter.Converter; +/** + * This class provides Spring Converter beans for the enum models in the OpenAPI specification. + * + * By default, Spring only converts primitive types to enums using Enum::valueOf, which can prevent + * correct conversion if the OpenAPI specification is using an `enumPropertyNaming` other than + * `original` or the specification has an integer enum. + */ @Configuration(value = "org.openapitools.configuration.enumConverterConfiguration") public class EnumConverterConfiguration { diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/configuration/EnumConverterConfiguration.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/configuration/EnumConverterConfiguration.java index 941171792aa5..9aebf5a18296 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/configuration/EnumConverterConfiguration.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/configuration/EnumConverterConfiguration.java @@ -7,6 +7,13 @@ import org.springframework.context.annotation.Configuration; import org.springframework.core.convert.converter.Converter; +/** + * This class provides Spring Converter beans for the enum models in the OpenAPI specification. + * + * By default, Spring only converts primitive types to enums using Enum::valueOf, which can prevent + * correct conversion if the OpenAPI specification is using an `enumPropertyNaming` other than + * `original` or the specification has an integer enum. + */ @Configuration(value = "org.openapitools.configuration.enumConverterConfiguration") public class EnumConverterConfiguration { diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/configuration/EnumConverterConfiguration.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/configuration/EnumConverterConfiguration.java index 941171792aa5..9aebf5a18296 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/configuration/EnumConverterConfiguration.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/configuration/EnumConverterConfiguration.java @@ -7,6 +7,13 @@ import org.springframework.context.annotation.Configuration; import org.springframework.core.convert.converter.Converter; +/** + * This class provides Spring Converter beans for the enum models in the OpenAPI specification. + * + * By default, Spring only converts primitive types to enums using Enum::valueOf, which can prevent + * correct conversion if the OpenAPI specification is using an `enumPropertyNaming` other than + * `original` or the specification has an integer enum. + */ @Configuration(value = "org.openapitools.configuration.enumConverterConfiguration") public class EnumConverterConfiguration { diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/configuration/EnumConverterConfiguration.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/configuration/EnumConverterConfiguration.java index 941171792aa5..9aebf5a18296 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/configuration/EnumConverterConfiguration.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/configuration/EnumConverterConfiguration.java @@ -7,6 +7,13 @@ import org.springframework.context.annotation.Configuration; import org.springframework.core.convert.converter.Converter; +/** + * This class provides Spring Converter beans for the enum models in the OpenAPI specification. + * + * By default, Spring only converts primitive types to enums using Enum::valueOf, which can prevent + * correct conversion if the OpenAPI specification is using an `enumPropertyNaming` other than + * `original` or the specification has an integer enum. + */ @Configuration(value = "org.openapitools.configuration.enumConverterConfiguration") public class EnumConverterConfiguration { diff --git a/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/configuration/EnumConverterConfiguration.java b/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/configuration/EnumConverterConfiguration.java index 941171792aa5..9aebf5a18296 100644 --- a/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/configuration/EnumConverterConfiguration.java +++ b/samples/server/petstore/springboot-builtin-validation/src/main/java/org/openapitools/configuration/EnumConverterConfiguration.java @@ -7,6 +7,13 @@ import org.springframework.context.annotation.Configuration; import org.springframework.core.convert.converter.Converter; +/** + * This class provides Spring Converter beans for the enum models in the OpenAPI specification. + * + * By default, Spring only converts primitive types to enums using Enum::valueOf, which can prevent + * correct conversion if the OpenAPI specification is using an `enumPropertyNaming` other than + * `original` or the specification has an integer enum. + */ @Configuration(value = "org.openapitools.configuration.enumConverterConfiguration") public class EnumConverterConfiguration { diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/configuration/EnumConverterConfiguration.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/configuration/EnumConverterConfiguration.java index 941171792aa5..9aebf5a18296 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/configuration/EnumConverterConfiguration.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/configuration/EnumConverterConfiguration.java @@ -7,6 +7,13 @@ import org.springframework.context.annotation.Configuration; import org.springframework.core.convert.converter.Converter; +/** + * This class provides Spring Converter beans for the enum models in the OpenAPI specification. + * + * By default, Spring only converts primitive types to enums using Enum::valueOf, which can prevent + * correct conversion if the OpenAPI specification is using an `enumPropertyNaming` other than + * `original` or the specification has an integer enum. + */ @Configuration(value = "org.openapitools.configuration.enumConverterConfiguration") public class EnumConverterConfiguration { diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/configuration/EnumConverterConfiguration.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/configuration/EnumConverterConfiguration.java index 941171792aa5..9aebf5a18296 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/configuration/EnumConverterConfiguration.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/configuration/EnumConverterConfiguration.java @@ -7,6 +7,13 @@ import org.springframework.context.annotation.Configuration; import org.springframework.core.convert.converter.Converter; +/** + * This class provides Spring Converter beans for the enum models in the OpenAPI specification. + * + * By default, Spring only converts primitive types to enums using Enum::valueOf, which can prevent + * correct conversion if the OpenAPI specification is using an `enumPropertyNaming` other than + * `original` or the specification has an integer enum. + */ @Configuration(value = "org.openapitools.configuration.enumConverterConfiguration") public class EnumConverterConfiguration { diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/configuration/EnumConverterConfiguration.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/configuration/EnumConverterConfiguration.java index 941171792aa5..9aebf5a18296 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/configuration/EnumConverterConfiguration.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/configuration/EnumConverterConfiguration.java @@ -7,6 +7,13 @@ import org.springframework.context.annotation.Configuration; import org.springframework.core.convert.converter.Converter; +/** + * This class provides Spring Converter beans for the enum models in the OpenAPI specification. + * + * By default, Spring only converts primitive types to enums using Enum::valueOf, which can prevent + * correct conversion if the OpenAPI specification is using an `enumPropertyNaming` other than + * `original` or the specification has an integer enum. + */ @Configuration(value = "org.openapitools.configuration.enumConverterConfiguration") public class EnumConverterConfiguration { diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/configuration/EnumConverterConfiguration.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/configuration/EnumConverterConfiguration.java index 941171792aa5..9aebf5a18296 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/configuration/EnumConverterConfiguration.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/configuration/EnumConverterConfiguration.java @@ -7,6 +7,13 @@ import org.springframework.context.annotation.Configuration; import org.springframework.core.convert.converter.Converter; +/** + * This class provides Spring Converter beans for the enum models in the OpenAPI specification. + * + * By default, Spring only converts primitive types to enums using Enum::valueOf, which can prevent + * correct conversion if the OpenAPI specification is using an `enumPropertyNaming` other than + * `original` or the specification has an integer enum. + */ @Configuration(value = "org.openapitools.configuration.enumConverterConfiguration") public class EnumConverterConfiguration { diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/configuration/EnumConverterConfiguration.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/configuration/EnumConverterConfiguration.java index 941171792aa5..9aebf5a18296 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/configuration/EnumConverterConfiguration.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/configuration/EnumConverterConfiguration.java @@ -7,6 +7,13 @@ import org.springframework.context.annotation.Configuration; import org.springframework.core.convert.converter.Converter; +/** + * This class provides Spring Converter beans for the enum models in the OpenAPI specification. + * + * By default, Spring only converts primitive types to enums using Enum::valueOf, which can prevent + * correct conversion if the OpenAPI specification is using an `enumPropertyNaming` other than + * `original` or the specification has an integer enum. + */ @Configuration(value = "org.openapitools.configuration.enumConverterConfiguration") public class EnumConverterConfiguration { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/configuration/EnumConverterConfiguration.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/configuration/EnumConverterConfiguration.java index 941171792aa5..9aebf5a18296 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/configuration/EnumConverterConfiguration.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/configuration/EnumConverterConfiguration.java @@ -7,6 +7,13 @@ import org.springframework.context.annotation.Configuration; import org.springframework.core.convert.converter.Converter; +/** + * This class provides Spring Converter beans for the enum models in the OpenAPI specification. + * + * By default, Spring only converts primitive types to enums using Enum::valueOf, which can prevent + * correct conversion if the OpenAPI specification is using an `enumPropertyNaming` other than + * `original` or the specification has an integer enum. + */ @Configuration(value = "org.openapitools.configuration.enumConverterConfiguration") public class EnumConverterConfiguration { diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/configuration/EnumConverterConfiguration.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/configuration/EnumConverterConfiguration.java index 941171792aa5..9aebf5a18296 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/configuration/EnumConverterConfiguration.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/configuration/EnumConverterConfiguration.java @@ -7,6 +7,13 @@ import org.springframework.context.annotation.Configuration; import org.springframework.core.convert.converter.Converter; +/** + * This class provides Spring Converter beans for the enum models in the OpenAPI specification. + * + * By default, Spring only converts primitive types to enums using Enum::valueOf, which can prevent + * correct conversion if the OpenAPI specification is using an `enumPropertyNaming` other than + * `original` or the specification has an integer enum. + */ @Configuration(value = "org.openapitools.configuration.enumConverterConfiguration") public class EnumConverterConfiguration { diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/configuration/EnumConverterConfiguration.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/configuration/EnumConverterConfiguration.java index 941171792aa5..9aebf5a18296 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/configuration/EnumConverterConfiguration.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/configuration/EnumConverterConfiguration.java @@ -7,6 +7,13 @@ import org.springframework.context.annotation.Configuration; import org.springframework.core.convert.converter.Converter; +/** + * This class provides Spring Converter beans for the enum models in the OpenAPI specification. + * + * By default, Spring only converts primitive types to enums using Enum::valueOf, which can prevent + * correct conversion if the OpenAPI specification is using an `enumPropertyNaming` other than + * `original` or the specification has an integer enum. + */ @Configuration(value = "org.openapitools.configuration.enumConverterConfiguration") public class EnumConverterConfiguration { diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/configuration/EnumConverterConfiguration.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/configuration/EnumConverterConfiguration.java index 941171792aa5..9aebf5a18296 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/configuration/EnumConverterConfiguration.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/configuration/EnumConverterConfiguration.java @@ -7,6 +7,13 @@ import org.springframework.context.annotation.Configuration; import org.springframework.core.convert.converter.Converter; +/** + * This class provides Spring Converter beans for the enum models in the OpenAPI specification. + * + * By default, Spring only converts primitive types to enums using Enum::valueOf, which can prevent + * correct conversion if the OpenAPI specification is using an `enumPropertyNaming` other than + * `original` or the specification has an integer enum. + */ @Configuration(value = "org.openapitools.configuration.enumConverterConfiguration") public class EnumConverterConfiguration { diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/configuration/EnumConverterConfiguration.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/configuration/EnumConverterConfiguration.java index 941171792aa5..9aebf5a18296 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/configuration/EnumConverterConfiguration.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/configuration/EnumConverterConfiguration.java @@ -7,6 +7,13 @@ import org.springframework.context.annotation.Configuration; import org.springframework.core.convert.converter.Converter; +/** + * This class provides Spring Converter beans for the enum models in the OpenAPI specification. + * + * By default, Spring only converts primitive types to enums using Enum::valueOf, which can prevent + * correct conversion if the OpenAPI specification is using an `enumPropertyNaming` other than + * `original` or the specification has an integer enum. + */ @Configuration(value = "org.openapitools.configuration.enumConverterConfiguration") public class EnumConverterConfiguration { diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/configuration/EnumConverterConfiguration.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/configuration/EnumConverterConfiguration.java index d3923226f818..e8b1c356a0f7 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/configuration/EnumConverterConfiguration.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/configuration/EnumConverterConfiguration.java @@ -7,6 +7,13 @@ import org.springframework.context.annotation.Configuration; import org.springframework.core.convert.converter.Converter; +/** + * This class provides Spring Converter beans for the enum models in the OpenAPI specification. + * + * By default, Spring only converts primitive types to enums using Enum::valueOf, which can prevent + * correct conversion if the OpenAPI specification is using an `enumPropertyNaming` other than + * `original` or the specification has an integer enum. + */ @Configuration(value = "org.openapitools.configuration.enumConverterConfiguration") public class EnumConverterConfiguration { diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/configuration/EnumConverterConfiguration.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/configuration/EnumConverterConfiguration.java index 56850481c2d9..9e72f2634517 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/configuration/EnumConverterConfiguration.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/configuration/EnumConverterConfiguration.java @@ -7,6 +7,13 @@ import org.springframework.context.annotation.Configuration; import org.springframework.core.convert.converter.Converter; +/** + * This class provides Spring Converter beans for the enum models in the OpenAPI specification. + * + * By default, Spring only converts primitive types to enums using Enum::valueOf, which can prevent + * correct conversion if the OpenAPI specification is using an `enumPropertyNaming` other than + * `original` or the specification has an integer enum. + */ @Configuration(value = "org.openapitools.configuration.enumConverterConfiguration") public class EnumConverterConfiguration {