Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider making response descriptions optional in openapi zod schema #407

Open
brettimus opened this issue Dec 11, 2024 · 0 comments
Open

Comments

@brettimus
Copy link
Contributor

brettimus commented Dec 11, 2024

Code:

description: z.string(),

@mies hit an issue with Hono-Zod-OpenAPI where we wouldn't show docs for a response because our zod schema rejected a response that didn't have a description along with it

Technically the current schema is in line with what OpenAPIHono expects - it will show a type error in your app if you don't provide a description for the response... however, it could be funky for end users to not see a Docs tab show up for their route.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant