Override Binary Type to Generate as File Instead of Blob #934
Unanswered
troypoulter
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm working with an OpenAPI spec that involves multipart uploads for binary data. By default, Orval generates these fields with the
Blob
type. However, this presents a challenge for me because theBlob
type doesn't allow specifying a filename, which is necessary for how I construct myFormData
payloads for uploads.Question:
Is there a built-in way to configure Orval so that it generates
File
instead ofBlob
for binary types in the API specification?Workarounds Considered:
I am considering using a post-processor script to perform a find-and-replace operation on the generated code, but this seems suboptimal. Any better alternatives or native solutions in Orval would be greatly appreciated.
Beta Was this translation helpful? Give feedback.
All reactions