File tree 2 files changed +7
-1
lines changed
src/main/kotlin/com/github/raymank26
2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ plugins {
5
5
}
6
6
7
7
group = " com.github.raymank26"
8
- version = project.findProperty(" version" )?.takeIf { it != " unspecified" } ? : " 1.13 -SNAPSHOT"
8
+ version = project.findProperty(" version" )?.takeIf { it != " unspecified" } ? : " 1.14 -SNAPSHOT"
9
9
10
10
repositories {
11
11
mavenCentral()
Original file line number Diff line number Diff line change @@ -184,11 +184,17 @@ class TypesGenerator(
184
184
.addMember(" %S" , property.name)
185
185
.useSiteTarget(AnnotationSpec .UseSiteTarget .FIELD )
186
186
.build()
187
+ val jsonPropertyGetter = AnnotationSpec
188
+ .builder(ClassName (" com.fasterxml.jackson.annotation" , " JsonProperty" ))
189
+ .addMember(" %S" , property.name)
190
+ .useSiteTarget(AnnotationSpec .UseSiteTarget .GET )
191
+ .build()
187
192
PropertySpec
188
193
.builder(property.name.decapitalized(), generateTypeDescriptor(property.type, property.required))
189
194
.initializer(property.name.decapitalized())
190
195
.addAnnotation(jsonProperty)
191
196
.addAnnotation(jsonPropertyField)
197
+ .addAnnotation(jsonPropertyGetter)
192
198
.build()
193
199
}.toMutableList()
194
200
if (properties.isEmpty()) {
You can’t perform that action at this time.
0 commit comments