Replies: 1 comment 1 reply
-
|
You do not need |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Uh oh!
There was an error while loading. Please reload this page.
-
Context
Using
@orpc/openapiwithOpenAPIHandlerandOpenAPIReferencePluginto generate OpenAPI specs fromcontracts.
When using
z.file()in a contract:The generated OpenAPI spec shows:
{ "type": "string", "contentMediaType": "*/*" }We're using https://orval.dev/ to generate TypeScript client code from the spec. With the above output,
orval generates string for the file field. However, when we manually add format: "binary" via the
registry, orval correctly generates Blob.
Current Workaround
(And JSON_SCHEMA_OUTPUT_REGISTRY for output schemas)
Question
I'm not 100% sure where the issue lies - it could be:
z.file()automatically include format: "binary" alongside contentMediaType forwider compatibility with code generators?
binary content?
Just wanted to understand the recommended pattern here. The workaround works fine, but wondering if
there's a cleaner way or if this is something missing on either side.
Environment
Beta Was this translation helpful? Give feedback.
All reactions