Commit f9d497d
committed
fix(kotlin-spring): use correct Jackson 3 property path for WRITE_DATES_AS_TIMESTAMPS
When using Spring Boot 4 with Jackson 3, the property path for
WRITE_DATES_AS_TIMESTAMPS changed from:
spring.jackson.serialization.WRITE_DATES_AS_TIMESTAMPS
to:
spring.jackson.datatype.datetime.WRITE_DATES_AS_TIMESTAMPS
This fix adds conditional logic to the kotlin-spring generator template
to use the correct property path based on useSpringBoot4 flag, matching
the behavior already implemented in the JavaSpring generator.
Fixes binding error:
'Failed to bind properties under spring.jackson.serialization to
java.util.Map<tools.jackson.databind.SerializationFeature, java.lang.Boolean>:
No enum constant tools.jackson.databind.SerializationFeature.WRITE_DATES_AS_TIMESTAMPS'1 parent 0659b25 commit f9d497d
2 files changed
Lines changed: 10 additions & 2 deletions
File tree
- modules/openapi-generator/src/main/resources/kotlin-spring/libraries/spring-boot
- samples/server/petstore/kotlin-springboot-4/src/main/resources
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
6 | 12 | | |
7 | 13 | | |
| 14 | + | |
8 | 15 | | |
9 | 16 | | |
10 | 17 | | |
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
0 commit comments