Closed postatum closed 4 years ago
it would be nice to explain the rational behind this change (i.e. why it was needed) and what this change implies for the end-users.
Updated the issue description to describe error format change in detail. Please let me know if the update looks good.
Major changes:
webapi-parser
;webapi-parser
;RAMLVersion
(now inferred automatically);webapi-parser.Operation
object as first argument, path string as second argument, method name as third and options object as final argument;Minor changes:
const/let
instead ofvar
;Making a release:
PR depends on:
To test the PR locally with all the reworked Osprey sub-dependencies, use this Makefile.
Error format change
The new version changes the errors response format for RAML and JSON Schema validation errors. The new errors responses are more uniformal and descriptive while at the same time being less verbose. The change is caused by the fact that a different parser is used to parse RAML specs, which in turn produces a different parsed document model.
Let's explore the changes on body validation examples.
JSON Schema validation example responses
Number value is greater than the "maximum":
Old:
New:
Less properties than "minProperties":
Old:
New:
RAML validation responses examples
Number value is greater than the "maximum":
Old:
New:
Less properties than "minProperties":
Old:
New: