-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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(framework): add class-validator support #6840
feat(framework): add class-validator support #6840
Conversation
✅ Deploy Preview for novu-stg-vite-dashboard-poc ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
@rifont i marked you to may review this PR, as you have created the original validator implementation. |
@paulwer Thanks for submitting this PR. It coincides with an internal conversation about allowing contributors to bring their own validations, such as Zod, ClassValidator, etc... Our dynamic require("x") pattern, along with peer dependencies, served us well so far, but as we moved our package to its ESM/CJS state, we noticed it caused some issues in some bundlers, such as Turbopack beta. We expect to conclude our strategy by the end of this week, and the decision might also affect this PR. We would love to hear your opinions or suggestions on the matter. |
Hi @SokratisVidros, thanks for the feedback. If the descision would be to only allow json-schema, i would like to encourage you to provide examples or mapper functions to be installed additionaly. If I can support this in any way, please let me know :) |
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.
Awesome contribution @paulwer ! This will provide a strong basis for NestJS usage of the Framework.
I added some comments for your review, we will get this merged in and released ASAP.
Co-authored-by: Richard Fontein <32132657+rifont@users.noreply.github.com>
Co-authored-by: Richard Fontein <32132657+rifont@users.noreply.github.com>
@rifont there is also a patch for the lib created, which we can try to use if there are any issues while building |
…validator-support' into feat-package-class-validator-support
…validator-support
solid changes :) |
Not true, i have some minor suggestions :)
|
…validator-support
…validator-support
Ahh, so evidently Github will automatically close a fork PR when deleting an upstream branch (which in the case of @paulwer , do you have the capability to reopen the PR on your end? If not we can create a new PR with all the existing changes. |
no worries, i created another pr with the latest changes :) please check |
What changed? Why was the change needed?
Class Validator support for @novu/framework
Screenhots
Class validator peer dependency import failure message
Expand for optional sections
### Related enterprise PRSpecial notes for your reviewer
closes #6682