-
Notifications
You must be signed in to change notification settings - Fork 37
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
Joi 1.16 update : Error: requires a joi schema object #57
Comments
So looking deeper to this issue, I figured out that, as said on joi v16 release notes:
Updating If anyone need some help for doing the upgrade I could give a hand but not carry all by myself 😦 |
Hope this project support the joi v16. |
I forked this project in my repo then rewrote some code using typescript and made some adjustments to fit joi v16.0, almost test cases passed. May I make a pull request? @lightsofapollo |
@yeongjet I tried your repo and it is working, I really hope you could contribute your work to the repo. But I found that you're changing all files to typescript and the commit message is And did you remove any previous test cases? |
@BrianSo No, in order to make these test cases running in jest, I have to make syntax modification, there's no difference in fundamental. Except these, the most noteworthy in my commit is remapping the fields and make them works in original logic. |
@yeongjet Yes! This repo is in maintenance mode but I'd love some contributions particularly in typescript/new joi direction. |
@lightsofapollo There has a lot of changes in my commit, which branch should be merged? maybe create a new branch? |
We'd love to see joi 1.16 supported as well |
Any update on this? |
@lightsofapollo @yeongjet - any chance this will get merged? This is a package I really need, and it's completely broken in latest Joi. Looks like no movement in over a year. :( Dead project? |
@vgjenks We now use https://www.npmjs.com/package/joi-to-json - works really well for our use case Edit: Here is the corresponding github repo https://github.com/kenspirit/joi-to-json |
@simlu Works brilliantly, thank you! Will come back w/ feedback as I throw more complex schemas at it. |
While trying to convert my joi schema to JSON I got an error :
AssertionError [ERR_ASSERTION]: requires a joi schema object
Here is my code :
This seems to be related to hapijs/joi#1834
We should use
Joi.isSchema()
instead.I will try to provide a PR using isSchema when available then fallback to isJoi if it's OK for you.
The text was updated successfully, but these errors were encountered: