Upgrade dependencies to support hapi 19 #173
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of changes:
This PR updates several dependencies (list below). The hapi upgrade includes two important changes:
There is no longer a way to query the strategies registered with the server. The previous behavior allowed hapi-openapi to issue a warning that an auth strategy was not registered, then continue creating the route without the specified auth options. With this change, the route options will be added as long as they are specified. If the auth strategy is not registered, then an error will be thrown when registering the route. This seems to be inline with the existing text in README.md.
Hapi 19 no longer allows uncompiled top-level validation schemas unless a validator is configured with the server. In previous versions, Joi was used by default. To address this, after the validators are created for a path/operation, any top-level object that is not already a Joi schema is wrapped in Joi.object(). I went with this approach rather than setting a default validator on the server so that the host codebase could still have flexibility to use a different default validator for any routes that may be created outside hapi-openapi.
Dependencies upgraded:
At the time of this PR, all vulnerabilities found with
npm audit
have been addressed.Issues addressed:
This PR addresses or partially addresses the following issues: