Skip to content

fix: preserve multipart upload filenames across clients#122

Merged
adamcavendish merged 1 commit into
masterfrom
adamcavendish/multipart-upload-filenames
Jun 16, 2026
Merged

fix: preserve multipart upload filenames across clients#122
adamcavendish merged 1 commit into
masterfrom
adamcavendish/multipart-upload-filenames

Conversation

@adamcavendish

@adamcavendish adamcavendish commented Jun 15, 2026

Copy link
Copy Markdown
Collaborator

Summary

IR:

  • Add request-body-specific multipart input planning for object-shaped multipart/form-data
  • Keep canonical schema models schema-faithful, including non-multipart format: binary
  • Track per-part default filename fallbacks from multipart wire field names

Clients:

  • Generate multipart request input models such as {Operation}MultipartRequestBody
  • Emit upload wrappers only when multipart request input fields need them
  • Derive upload filenames from caller-provided wrapper/File values across TypeScript, Go, Python, Java, Kotlin, and Rust
  • Keep text and JSON multipart parts on their existing code paths

Tests:

  • Regenerate multipart-capable goldens across all registered generators
  • Pin dynamic filename behavior in cross-client smoke coverage, including Rust reqwest/ureq/aioduct

Validation

  • cargo test --test multipart_runtime_smoke
  • just golden-check
  • cargo fmt --all -- --check
  • cargo clippy --workspace --all-targets --all-features -- -D warnings
  • git diff --check

Generated-client build checks:

  • npx --yes -p typescript -c 'just golden-build-all' passed TypeScript tsc 69/69, TypeScript vp 5/5, and Go 57/57 before Rust registry download failures interrupted the full run.
  • just golden-python::build passed Python-httpx 57/57 and Python-requests 57/57.
  • just golden-java::build passed Java 58/58.
  • just golden-kotlin::build passed Kotlin 58/58.
  • Rust generated build sections were intermittently blocked by crates.io connection resets/timeouts in unrelated fixtures, but multipart fixtures passed for reqwest, ureq, and aioduct during the retry runs.

IR:
- Add request-body-specific multipart input planning
- Keep canonical binary schemas unchanged outside multipart request bodies
- Track per-part filename fallbacks from multipart wire names

Clients:
- Emit UploadFile wrappers only for multipart upload request inputs
- Read caller filenames across TypeScript, Go, Python, Java, Kotlin, and Rust clients
- Keep text and JSON multipart parts on their existing code paths

Tests:
- Regenerate multipart-capable goldens across all generators
- Pin dynamic filename behavior in cross-client smoke coverage
@adamcavendish adamcavendish force-pushed the adamcavendish/multipart-upload-filenames branch from c808789 to c23ee7e Compare June 16, 2026 19:40
@adamcavendish adamcavendish merged commit 43876b4 into master Jun 16, 2026
24 checks passed
@adamcavendish adamcavendish deleted the adamcavendish/multipart-upload-filenames branch June 16, 2026 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant