Skip to content

Override Binary Type to Generate as File Instead of Blob #934

Answered by DotNet2Web
troypoulter asked this question in Q&A
Discussion options

You must be logged in to vote

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.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by melloware
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
openapi_31 OpenAPI 3.1 related issue
2 participants