Description
When using @lombok.Data in additionalModelTypeAnnotations, the getters for fields are not generated. While @com.fasterxml.jackson.annotation.JsonProperty is only placed on getter methods, this causes a problem when the property name is in kebab-case rather than the default camel-case.
openapi-generator version
7.6.0
OpenAPI declaration file content or URL
pojo.mustache
Command line used for generation
Regular maven build.
Steps to reproduce
Configuring the maven plugin using the following configOptions:
<configOptions>
<library>spring-cloud</library>
<useSpringBoot3>true</useSpringBoot3>
<useResponseEntity>false</useResponseEntity>
<bigDeciamlAsString>true</bigDeciamlAsString>
<dateLibrary>java8-localdatetime</dateLibrary>
<useEnumCaseInsensitive>true</useEnumCaseInsensitive>
<configPackage>com.kbakhtiari</configPackage>
<generatedConstructorWithRequiredArgs>false</generatedConstructorWithRequiredArgs>
<additionalModelTypeAnnotations>
@lombok.Data
@lombok.NoArgsConstructor
@lombok.AllArgsConstructor
@lombok.Builder(toBuilder = true)
</additionalModelTypeAnnotations>
</configOptions>
Related issues/PRs
N/A
Suggest a fix/enhancement
Adding the following code snippet to pojo.mustache:
{{#lombok.Data}}
@JsonProperty("{{baseName}}")
{{/lombok.Data}}
Description
When using
@lombok.DatainadditionalModelTypeAnnotations, the getters for fields are not generated. While@com.fasterxml.jackson.annotation.JsonPropertyis only placed on getter methods, this causes a problem when the property name is in kebab-case rather than the default camel-case.openapi-generator version
7.6.0
OpenAPI declaration file content or URL
pojo.mustache
Command line used for generation
Regular maven build.
Steps to reproduce
Configuring the maven plugin using the following configOptions:
Related issues/PRs
N/A
Suggest a fix/enhancement
Adding the following code snippet to pojo.mustache: