Override Binary Type to Generate as File Instead of Blob #934
-
I'm working with an OpenAPI spec that involves multipart uploads for binary data. By default, Orval generates these fields with the Question: Workarounds Considered: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Really an old post but maybe someone encounters the same issue. This is what I had to do to fix this. In your orval.config.ts file add an override for the contenttype. Include the 'multipart/formdata' to it and your done. It would be:
It still generates File to Blob but you can now send the file instead of having it to convert to blob. |
Beta Was this translation helpful? Give feedback.
Really an old post but maybe someone encounters the same issue.
This is what I had to do to fix this.
In your orval.config.ts file add an override for the contenttype. Include the 'multipart/formdata' to it and your done.
It would be:
{ ..., ..., "override": { "contentType": { "include": ['multipart/formdata'] } } }
It still generates File to Blob but you can now send the file instead of having it to convert to blob.