Is your feature request related to a problem? Please describe.
When using the spring generator (JavaSpring), the supporting file EnumConverterConfiguration.java is generated without the @Generated annotation. All other generated files (models, API interfaces, delegate interfaces, etc.) are correctly annotated with @Generated via the generatedAnnotation partial. This inconsistency means tools that use @Generated to skip static analysis, formatting, or coverage checks (e.g., Checkstyle, JaCoCo, SonarQube) will incorrectly process EnumConverterConfiguration as hand-written code.
Describe the solution you'd like
Update modules/openapi-generator/src/main/resources/JavaSpring/converter.mustache to include:
-
The jakarta.annotation.Generated import (using {{javaxPackage}}):
import {{javaxPackage}}.annotation.Generated;
-
The {{>generatedAnnotation}} partial before the class declaration, consistent with pojo.mustache, api.mustache, etc.:
{{>generatedAnnotation}}
@Configuration(value = "{{configPackage}}.enumConverterConfiguration")
public class EnumConverterConfiguration {
The resulting generated file would look like:
import jakarta.annotation.Generated;
// ...
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", ...)
@Configuration(value = "com.example.config.enumConverterConfiguration")
public class EnumConverterConfiguration {
// ...
}
Describe alternatives you've considered
- Overriding
converter.mustache locally in each project — works but requires every consumer to maintain a copy and track upstream changes manually.
Additional context
- The issue affects at least the
JavaSpring generator (spring generator name). Other generators with a similar converter.mustache (e.g., java-micronaut-server) may be affected too.
pojo.mustache, api.mustache, and apiDelegate.mustache all already use {{>generatedAnnotation}} as a reference for the correct pattern.
generatedAnnotation.mustache (the partial) already exists and handles the hideGenerationTimestamp flag correctly.
Is your feature request related to a problem? Please describe.
When using the
springgenerator (JavaSpring), the supporting fileEnumConverterConfiguration.javais generated without the@Generatedannotation. All other generated files (models, API interfaces, delegate interfaces, etc.) are correctly annotated with@Generatedvia thegeneratedAnnotationpartial. This inconsistency means tools that use@Generatedto skip static analysis, formatting, or coverage checks (e.g., Checkstyle, JaCoCo, SonarQube) will incorrectly processEnumConverterConfigurationas hand-written code.Describe the solution you'd like
Update
modules/openapi-generator/src/main/resources/JavaSpring/converter.mustacheto include:The
jakarta.annotation.Generatedimport (using{{javaxPackage}}):The
{{>generatedAnnotation}}partial before the class declaration, consistent withpojo.mustache,api.mustache, etc.:The resulting generated file would look like:
Describe alternatives you've considered
converter.mustachelocally in each project — works but requires every consumer to maintain a copy and track upstream changes manually.Additional context
JavaSpringgenerator (springgenerator name). Other generators with a similarconverter.mustache(e.g.,java-micronaut-server) may be affected too.pojo.mustache,api.mustache, andapiDelegate.mustacheall already use{{>generatedAnnotation}}as a reference for the correct pattern.generatedAnnotation.mustache(the partial) already exists and handles thehideGenerationTimestampflag correctly.