This repository was archived by the owner on Dec 4, 2025. It is now read-only.
Commit 359b8a8
committed
fix(openapi): 🐛 support @jsonformat(shape = JsonFormat.Shape.NUMBER) annotation for enum types example
- Fixed the issue where examples for enums annotated with @jsonformat(shape = JsonFormat.Shape.NUMBER) were not displayed as numbers in OpenAPI.
- Handled enum types in API parameters with @jsonformat annotation.
- Set the corresponding parameter type, value, and enumeration info.
- Processed special cases of numeric enums with @jsonformat's shape attribute.
- Overridden parameter values with mock data from tag mappings.1 parent 9205e13 commit 359b8a8
3 files changed
Lines changed: 43 additions & 7 deletions
File tree
- src/main/java/com/ly/doc
- builder/openapi
- helper
- utils
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
| 44 | + | |
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
| |||
162 | 163 | | |
163 | 164 | | |
164 | 165 | | |
| 166 | + | |
165 | 167 | | |
166 | 168 | | |
167 | 169 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
191 | 191 | | |
192 | 192 | | |
193 | 193 | | |
| 194 | + | |
194 | 195 | | |
| 196 | + | |
| 197 | + | |
195 | 198 | | |
196 | 199 | | |
197 | 200 | | |
| |||
237 | 240 | | |
238 | 241 | | |
239 | 242 | | |
| 243 | + | |
240 | 244 | | |
241 | 245 | | |
242 | 246 | | |
| |||
300 | 304 | | |
301 | 305 | | |
302 | 306 | | |
303 | | - | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
304 | 310 | | |
305 | | - | |
306 | | - | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
307 | 317 | | |
308 | 318 | | |
309 | 319 | | |
| |||
313 | 323 | | |
314 | 324 | | |
315 | 325 | | |
316 | | - | |
| 326 | + | |
317 | 327 | | |
318 | 328 | | |
319 | 329 | | |
| |||
370 | 380 | | |
371 | 381 | | |
372 | 382 | | |
373 | | - | |
| 383 | + | |
374 | 384 | | |
375 | 385 | | |
376 | 386 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| 14 | + | |
13 | 15 | | |
14 | 16 | | |
15 | 17 | | |
16 | 18 | | |
17 | 19 | | |
18 | 20 | | |
19 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
20 | 37 | | |
21 | | - | |
| 38 | + | |
22 | 39 | | |
23 | 40 | | |
24 | 41 | | |
| |||
32 | 49 | | |
33 | 50 | | |
34 | 51 | | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
35 | 59 | | |
36 | 60 | | |
37 | 61 | | |
| |||
0 commit comments