Commit 1117720
committed
fix(kotlin-client): handle Jackson 3 API changes in Serializer template
Jackson 3 moved/renamed several APIs:
- findAndRegisterModules() not needed (modules auto-discovered)
- SerializationFeature.WRITE_DATES_AS_TIMESTAMPS -> DateTimeFeature
- DeserializationFeature.READ_UNKNOWN_ENUM_VALUES_USING_DEFAULT_VALUE -> EnumFeature
Add conditionals in Serializer.kt.mustache for Jackson 2 vs 3.1 parent 7829af0 commit 1117720
2 files changed
Lines changed: 24 additions & 4 deletions
File tree
- modules/openapi-generator/src/main/resources/kotlin-client/jvm-common/infrastructure
- samples/client/petstore/kotlin-jackson3/src/main/kotlin/org/openapitools/client/infrastructure
Lines changed: 20 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
35 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
36 | 44 | | |
37 | 45 | | |
38 | 46 | | |
| |||
122 | 130 | | |
123 | 131 | | |
124 | 132 | | |
| 133 | + | |
125 | 134 | | |
| 135 | + | |
126 | 136 | | |
127 | 137 | | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
128 | 142 | | |
| 143 | + | |
129 | 144 | | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
130 | 149 | | |
| 150 | + | |
131 | 151 | | |
132 | 152 | | |
133 | 153 | | |
| |||
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
12 | | - | |
13 | 13 | | |
14 | | - | |
15 | | - | |
| 14 | + | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
0 commit comments