-
-
Notifications
You must be signed in to change notification settings - Fork 648
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
feat(validator): Introduce responseValidator
#3843
base: main
Are you sure you want to change the base?
Conversation
responseValidator
responseValidator
What do you think about this API? @yusukebe |
The only code added to context is the following, with no major changes to the bundle size. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3843 +/- ##
==========================================
- Coverage 91.31% 90.57% -0.75%
==========================================
Files 161 163 +2
Lines 10240 10333 +93
Branches 2999 2889 -110
==========================================
+ Hits 9351 9359 +8
- Misses 888 973 +85
Partials 1 1 ☔ View full report in Codecov by Sentry. |
responseValidator
responseValidator
In the future, it may be necessary to properly infer the output type for RPC. |
@EdamAme-x just bringing to your attention that there's an initiative of a standard schema specification that seems to be implemented in latest zod, valibot beta, arktypes... I don't know if it affects your PR but in case it might be good to have a look. BTW I'm just starting some internal projects with hono and nextjs and it looks great ! |
@belgattitude There is already an interesting discussion about standard schema in the honojs/middleware repository, if you want to check it out! |
Resolve: #2439
Related: honojs/middleware#184
This is proposal.
It has not been tested, nor is it fully molded.
The data is kept intact in the context.
The author should do the following, if applicable
No Prepared
bun run format:fix && bun run lint:fix
to format the code