Skip to content

Commit

Permalink
feat: removes "severity" property from validation errors
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Validation errors no longer have "severity" property.
  • Loading branch information
artem-zakharchenko committed Jun 5, 2019
1 parent 808ad9e commit 2a364e2
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions features/validators.feature
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ Feature: Data validators and output format
"errors": [
{
"pointer": "/c",
"severity": "error",
"message": "At '/c' Missing required property: c"
}
],
Expand Down Expand Up @@ -71,21 +70,16 @@ Feature: Data validators and output format
"errors": {
"default": {
"pointer": "/missingKeyInRealData",
"message": "Key is missing",
"severity": "error"
"message": "Key is missing"
},
"type": "array",
"items": {
"type": "object",
"required": ["message", "severity"],
"required": ["message"],
"properties": {
"message": {
"type": "string",
"default": "No validator found for real data type."
},
"severity": {
"type": "string",
"default": "errors"
}
}
}
Expand All @@ -94,7 +88,6 @@ Feature: Data validators and output format
}
"""
And each result entry under "errors" key must contain "message" key
And each result entry under "errors" key must contain "severity" key
And validated HTTP component is considered invalid
And the output JSON contains key "validator" with one of the following values:
| JsonSchema |
Expand Down Expand Up @@ -137,8 +130,7 @@ Feature: Data validators and output format
"""
[
{
"message": "Real and expected data does not match.",
"severity": "error"
"message": "Real and expected data does not match."
}
]
"""
Expand Down Expand Up @@ -180,7 +172,6 @@ Feature: Data validators and output format
[
{
"pointer": "/a",
"severity": "error",
"message": "At '/a' Missing required property: a"
}
]
Expand Down Expand Up @@ -225,12 +216,10 @@ Feature: Data validators and output format
[
{
"pointer": "/a",
"severity": "error",
"message": "At '/a' Missing required property: a"
},
{
"pointer": "/missingKeyInRealData",
"severity": "error",
"message": "At '/missingKeyInRealData' Missing required property: missingKeyInRealData"
}
]
Expand Down

0 comments on commit 2a364e2

Please sign in to comment.