Skip to content

fix: file upload fields and multipart content-type#47

Merged
michailbrynard merged 2 commits intomasterfrom
v4/modular-sdk-redesign
Feb 25, 2026
Merged

fix: file upload fields and multipart content-type#47
michailbrynard merged 2 commits intomasterfrom
v4/modular-sdk-redesign

Conversation

@michailbrynard
Copy link
Copy Markdown
Contributor

Summary

  • Regenerated OpenAPI types with updated spec: file fields (icon, profile, logo, file) now correctly typed as Blob | File instead of string
  • Added post-codegen script to automatically fix Content-Type from application/json to multipart/form-data for endpoints with binary file fields
  • Enabled error throwing in API client configuration
  • Fixed auth type imports renamed in updated spec (LoginWritableLoginRequestWritable, etc.)

Test plan

  • Verify file upload endpoints (currency icon, user profile, company logo, documents) send multipart/form-data
  • Verify non-file endpoints still send application/json
  • Run npm run codegen:openapi-ts and confirm post-codegen fixes apply correctly
  • Run npm run build to confirm no type errors

🤖 Generated with Claude Code

michailbrynard and others added 2 commits February 25, 2026 22:34
Add a new configuration option `throwOnError: true` to the API client, ensuring that errors are thrown for non-ok responses, enhancing error handling capabilities.
…ontent-type

Updated spec now correctly types file upload fields (icon, profile, logo, file)
as Blob | File instead of string. Added post-codegen script to fix Content-Type
from application/json to multipart/form-data for endpoints with file fields.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@michailbrynard michailbrynard merged commit b06ab9f into master Feb 25, 2026
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