-
Notifications
You must be signed in to change notification settings - Fork 175
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: add @hono/schema-validator middleware #370
base: main
Are you sure you want to change the base?
feat: add @hono/schema-validator middleware #370
Conversation
🦋 Changeset detectedLatest commit: d9b4896 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Hi @sebastianwessel ! This is super interesting. I'd like to merge this, but please wait a bit. We'll release the v4 of Hono core soon. There will be some breaking changes for the validator. So it is better to wait until v4 is released than to merge now. |
Until that, could you add the CI in |
|
Thanks.
Yeah. Please wait a moment. |
What is the status of this PR? |
v4 is available now. Can you update this PR? |
54bf5c9
to
434539e
Compare
Updated the pr Also changed the typeschema packages to their new nameings - here I'm not sure if this package should use the @typeschema/main or @typeschema/all (currently used) |
Why not change the name to |
@yusukebe |
@yusukebe renamed it. I also switched to the |
], | ||
"scripts": { | ||
"test": "NODE_OPTIONS=\"$NODE_OPTIONS --experimental-vm-modules\" jest", | ||
"build:cjs": "tsc -p tsconfig.cjs.json", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you use tsup
to build and vitest
for testing, referring to the hello
middleware?
https://github.com/honojs/middleware/tree/main/packages/hello
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file's change is not needed.
Thanks.
I also think it's good. It's better to write the instructions on README. I've left some comments. Please check them. |
This middleware leverages TypeSchema, offering an abstraction layer that facilitates interaction with a variety of validation libraries through a unified interface.
Consequently, there is no immediate requirement to develop a dedicated middleware for each validation library.
This not only reduces maintenance efforts but also extends support to validation libraries that may currently lack compatibility.
List of possible validation libs: https://typeschema.com/