-
Notifications
You must be signed in to change notification settings - Fork 75
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
Update needed to support new version of Hapi and Joi #163
Comments
I'm getting an error when trying to render the /documentation endpoint due to the Joi versioning: All of the packages in my project use Joi 16.x.x, where hapi-openapi uses 13.x.x which I believe is causing the error |
Hi @edward-whittle there is a new version release. Can you confirm if this fixed your issue |
@rmothilal anyway to disable |
Here's an issue that we've run into since upgrading. ContextWe use this plugin in a large "mock" API server that abstracts away our actual API so frontend development can work without depending on services being available. All of the endpoints we design using this plugin mirror the actual service endpoints used in production today, with mock JSON returned/mock errors thrown/other real world scenarios mocked. IssueSince upgrading, many of our defined endpoints with request bodies are failing Joi validation on objects being passed with empty strings, due to the nature of how our frontends have been implemented. By default, Joi does not allow empty strings, you have to explicitly We discovered this problem yesterday and it's going to affect multiple teams of developers, so a quick fix is greatly desired. Potential Solutions
|
I'd be happy to open a PR for this one if the Kraken team can provide some guidance on the right approach, so I don't go against standards. |
@tlivings thanks for bringing the changes from the enjoi library and @sprootshift for the additions required to cater for updated versions of Hapi and Joi |
@edward-whittle there is a new library released could you please let me know if your issues are resolved |
@rodoabad im not sure that is possible maybe @tlivings would be able to give a concrete answer |
I believe this is caused by a change in enjoi: tlivings/enjoi#74 |
This issue is solved |
Hapi and Joi have had a massive refactor of their libraries hapijs/joi#2037 hapi-openapi relies on this library to validate a swagger. The enjoi library also needs an update to use these latest libraries so that the hapi-openapi can operate correctly. My project has a dependency on this library and we would really appreciate any assistance with this matter
The text was updated successfully, but these errors were encountered: