You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We use this library to generate both input and output schemas for our API definition. However, we run into issues when we have a Zod schema that uses .default(). The output OpenAPI schema marks the field as "optional", but since we're using it as a response value it should always be defined.
Is there some way to use the same Zod schema, and pass in some kind of .openapi() option to tell the generator to use the Zod output, not input?
The text was updated successfully, but these errors were encountered:
Hi,
We use this library to generate both input and output schemas for our API definition. However, we run into issues when we have a Zod schema that uses
.default()
. The output OpenAPI schema marks the field as "optional", but since we're using it as a response value it should always be defined.Is there some way to use the same Zod schema, and pass in some kind of
.openapi()
option to tell the generator to use the Zod output, not input?The text was updated successfully, but these errors were encountered: