Commit ab478f1
committed
feat(codegen): generate builder APIs for multipart/related
Implement code generation for multipart/related request bodies with
expanded builder patterns. Instead of a single body parameter,
multipart schemas are expanded into individual builder methods for
each property (e.g., .file() and .metadata() methods).
Key changes:
- Parse multipart/related schemas and expand into typed properties
- Convert binary schema properties (format: binary) to Vec<u8>
- Generate MultipartRelatedBody trait implementations
- Reconstruct multipart structs in builder send() methods
- Binary fields serialized as application/octet-stream
- JSON fields serialized with serde_json
Addresses #12401 parent b3779e8 commit ab478f1
File tree
22 files changed
+4103
-2577
lines changed- progenitor-impl
- src
- tests
- output/src
- sample_openapi
22 files changed
+4103
-2577
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
440 | 440 | | |
441 | 441 | | |
442 | 442 | | |
443 | | - | |
| 443 | + | |
| 444 | + | |
444 | 445 | | |
445 | 446 | | |
446 | 447 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
164 | 169 | | |
165 | | - | |
| 170 | + | |
| 171 | + | |
166 | 172 | | |
167 | 173 | | |
168 | 174 | | |
| |||
250 | 256 | | |
251 | 257 | | |
252 | 258 | | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
253 | 265 | | |
254 | | - | |
| 266 | + | |
255 | 267 | | |
256 | 268 | | |
257 | 269 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| 53 | + | |
53 | 54 | | |
54 | 55 | | |
55 | 56 | | |
| |||
261 | 262 | | |
262 | 263 | | |
263 | 264 | | |
| 265 | + | |
264 | 266 | | |
265 | 267 | | |
266 | 268 | | |
| |||
312 | 314 | | |
313 | 315 | | |
314 | 316 | | |
| 317 | + | |
315 | 318 | | |
316 | 319 | | |
317 | 320 | | |
| |||
374 | 377 | | |
375 | 378 | | |
376 | 379 | | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
377 | 445 | | |
378 | 446 | | |
379 | 447 | | |
| |||
440 | 508 | | |
441 | 509 | | |
442 | 510 | | |
| 511 | + | |
| 512 | + | |
443 | 513 | | |
444 | 514 | | |
445 | 515 | | |
| |||
0 commit comments