-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Fix support for latest Joi #1178
Conversation
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.
Is this the only way to support it?
I would prefer a general purpose tool, such as the schema compiler instead have a custom specific code just to support an external library.
I can check if it is not a literal (e.g it has a constructor |
I think it would be better to figure out a general purpose approach. |
562bc61
to
6d5312d
Compare
@delvedor PTAL this is generic. |
I guess a more general purpose approach than this would be extracting validation into a plugin and just provide the interface inside the core? Then we could have:
Just some random thoughts |
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.
LGTM
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
I have not added any unit test because we cannot really test latest joi as it requires Node 8+. It works on my machine.
cc @cemremengu
Fixes #1158.
Checklist
npm run test
andnpm run benchmark