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
When using @hono/zod-openapi, defining request bodies and responses for APIs that utilize the application/json format seems unnecessarily verbose. Currently, we have to explicitly specify the content type for every request body and response, which adds repetitive boilerplate code. For example:
It would be much more convenient if there were a default shorthand for application/json to streamline this process. Ideally, we could define routes in a simpler way, like this:
This would make the code cleaner and more maintainable by eliminating redundant definitions. I believe such a shorthand would greatly enhance the developer experience and make the library more user-friendly.
Thank you for considering this suggestion!
The text was updated successfully, but these errors were encountered:
When using
@hono/zod-openapi
, defining request bodies and responses for APIs that utilize theapplication/json
format seems unnecessarily verbose. Currently, we have to explicitly specify the content type for every request body and response, which adds repetitive boilerplate code. For example:It would be much more convenient if there were a default shorthand for
application/json
to streamline this process. Ideally, we could define routes in a simpler way, like this:This would make the code cleaner and more maintainable by eliminating redundant definitions. I believe such a shorthand would greatly enhance the developer experience and make the library more user-friendly.
Thank you for considering this suggestion!
The text was updated successfully, but these errors were encountered: