Commit 98f3deb
Map array of binary strings to List<MultipartFile>
processArray resolved simple array item types via MapperUtil.getSimpleType,
which has no binary detection, so `type: array, items: {type: string,
format: binary}` produced List<String>. Detect binary items with
ApiTool.isBinary (covers both OpenAPI 3.0 `format: binary` and 3.1
contentEncoding/contentMediaType) and map them to MultipartFile, matching
the existing scalar-property behaviour in processStringProperty.
Adds an array-of-binary property to the testSimpleBuild Document schema as a
regression test.
Fixes #386
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent 267aa2d commit 98f3deb
3 files changed
Lines changed: 16 additions & 2 deletions
File tree
- multiapi-engine/src
- main/java/com/sngular/api/generator/plugin/common/tools
- test/resources/openapigenerator/testSimpleBuild
- assets/model
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
493 | 493 | | |
494 | 494 | | |
495 | 495 | | |
| 496 | + | |
496 | 497 | | |
497 | 498 | | |
498 | 499 | | |
499 | | - | |
| 500 | + | |
500 | 501 | | |
501 | 502 | | |
502 | 503 | | |
| |||
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
522 | 522 | | |
523 | 523 | | |
524 | 524 | | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
525 | 530 | | |
526 | 531 | | |
527 | 532 | | |
| |||
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
5 | 7 | | |
| 8 | + | |
6 | 9 | | |
7 | 10 | | |
8 | 11 | | |
| |||
12 | 15 | | |
13 | 16 | | |
14 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
15 | 22 | | |
16 | 23 | | |
17 | 24 | | |
18 | 25 | | |
19 | 26 | | |
20 | 27 | | |
21 | | - | |
| 28 | + | |
22 | 29 | | |
| 30 | + | |
23 | 31 | | |
24 | 32 | | |
25 | 33 | | |
| |||
0 commit comments