-
Notifications
You must be signed in to change notification settings - Fork 164
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
Add Effect Schema validator #589
Conversation
🦋 Changeset detectedLatest commit: b446bce The changes in this PR will be included in the next version bump. 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 @gunta I've left comments. Check them! |
…or` and fix devDependencies
@yusukebe Fixed! Also added github workflow. |
Hi @gunta I've refactored the code and corrected the settings. The biggest point is you don't need to write app.post('/user', effectValidator('json', User), (c) => {
const user = c.req.valid('json') // you don't need `as S.Schema.Type<typeof User>`
return c.json({
success: true,
message: `${user.name} is ${user.age}`
})
}) Perhaps this PR is already good. I'll merge it into the main and release the first version. If you have any problems, please create a PR or an issue again. Thank you for your contribution! |
@gunta this looks great. when i try to use it though, the build artifacts don't seem to have been included in the npm publish?
|
Ooops. I'm fixing it now. |
Hi @richburdon Fixed it in the latest version |
Hi @yusukebe, working great -- ありがとうございます。 |
Introduces a new very basic package for Effect Schema validation.