Repository navigation
Commit e660eb3
authored
[Java][native] Fix oneOf/anyOf with array or map members generating invalid code (#25012)
* [Java][native] Fix oneOf/anyOf models with array or map members
Generic container members of oneOf/anyOf generated invalid Java in the
native client, e.g. `getList<String>()` and `List<String>.class`.
Iterate over composedSchemas like the jersey2/jersey3/okhttp-gson
templates: use the erased type for class literals and instance checks,
a TypeReference to deserialize containers, sanitized getter names, and
skip constructors/instance checks whose erasure is duplicated.
Fixes #22304
Fixes #22249
* Update samples
* [Java][native] Gate anyOf array members on a JSON array and format map keys with %s
* Update samples
* Update samples for the jackson version bump on master
* Update samples for the 7.27.0-SNAPSHOT version bump1 parent 83a4a0c commit e660eb3
94 files changed
Lines changed: 7558 additions & 645 deletions
File tree
- .github/workflows
- bin/configs
- modules/openapi-generator/src
- main/resources/Java/libraries/native
- test
- java/org/openapitools/codegen/java
- resources/3_0/java/native
- samples/client
- others/java/native-oneOf-array
- .github/workflows
- .openapi-generator
- api
- docs
- gradle/wrapper
- src
- main
- java/org/openapitools/client
- api
- model
- test/java/org/openapitools/client
- api
- model
- petstore/java
- native-async/src/main/java/org/openapitools/client/model
- native-jackson3/src/main/java/org/openapitools/client/model
- native/src/main/java/org/openapitools/client/model
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
| 44 | + | |
43 | 45 | | |
44 | 46 | | |
45 | 47 | | |
| |||
109 | 111 | | |
110 | 112 | | |
111 | 113 | | |
| 114 | + | |
112 | 115 | | |
113 | 116 | | |
114 | 117 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| 90 | + | |
90 | 91 | | |
91 | | - | |
| 92 | + | |
92 | 93 | | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
93 | 100 | | |
94 | | - | |
| 101 | + | |
95 | 102 | | |
96 | 103 | | |
97 | | - | |
| 104 | + | |
98 | 105 | | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
99 | 115 | | |
100 | 116 | | |
101 | 117 | | |
| |||
105 | 121 | | |
106 | 122 | | |
107 | 123 | | |
| 124 | + | |
108 | 125 | | |
109 | 126 | | |
110 | 127 | | |
| |||
159 | 176 | | |
160 | 177 | | |
161 | 178 | | |
| 179 | + | |
162 | 180 | | |
163 | | - | |
164 | | - | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
165 | 184 | | |
166 | 185 | | |
167 | 186 | | |
| 187 | + | |
168 | 188 | | |
| 189 | + | |
169 | 190 | | |
| 191 | + | |
170 | 192 | | |
171 | | - | |
| 193 | + | |
172 | 194 | | |
| 195 | + | |
173 | 196 | | |
174 | 197 | | |
175 | 198 | | |
| |||
190 | 213 | | |
191 | 214 | | |
192 | 215 | | |
193 | | - | |
| 216 | + | |
194 | 217 | | |
195 | 218 | | |
196 | 219 | | |
| |||
204 | 227 | | |
205 | 228 | | |
206 | 229 | | |
| 230 | + | |
207 | 231 | | |
208 | | - | |
| 232 | + | |
| 233 | + | |
209 | 234 | | |
210 | 235 | | |
211 | 236 | | |
212 | 237 | | |
| 238 | + | |
213 | 239 | | |
| 240 | + | |
214 | 241 | | |
215 | 242 | | |
216 | 243 | | |
217 | 244 | | |
218 | 245 | | |
219 | | - | |
| 246 | + | |
220 | 247 | | |
221 | | - | |
| 248 | + | |
222 | 249 | | |
223 | 250 | | |
224 | 251 | | |
225 | 252 | | |
226 | 253 | | |
227 | 254 | | |
| 255 | + | |
228 | 256 | | |
| 257 | + | |
229 | 258 | | |
230 | | - | |
| 259 | + | |
231 | 260 | | |
232 | 261 | | |
233 | | - | |
234 | | - | |
| 262 | + | |
| 263 | + | |
235 | 264 | | |
236 | | - | |
237 | | - | |
| 265 | + | |
| 266 | + | |
238 | 267 | | |
239 | 268 | | |
| 269 | + | |
240 | 270 | | |
| 271 | + | |
241 | 272 | | |
242 | 273 | | |
243 | 274 | | |
| |||
0 commit comments