Added support for reporting UserErrors when provided definition is invalid. #81
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.
Overview
This PR fixes and issue where certain RAML definitions with traits that had description mentioned in them were failing. (Example definition).
This PR also includes support for introducing UserErrors when definition fails to convert and it's invalid definition. For validating the definition, we're using webapi-parser. We've also bumped up some of dependencies version to fix known critical vulnerabilities.
RCA
Issue was happening while assigning some of properties that an endpoint inherits via traits. In traits we can also have properties that are not object but we were using
Object.assign
in such case which resulted in below error.