node-consumer-pact-validation
Version:
A consumer pact generator written for pure nodeJS
37 lines (36 loc) • 669 B
JSON
{
"match": false,
"comment": "Wrong type for name key",
"expected" : {
"method": "POST",
"path": "/",
"query": "",
"headers": {"Content-Type": "application/json"},
"matchingRules": {
"$.body.animals": {"min": 1, "match": "type"},
"$.body.animals[*].*": {"match": "type"}
},
"body": {
"animals": [
{
"name" : "Fred"
}
]
}
},
"actual": {
"method": "POST",
"path": "/",
"query": "",
"headers": {"Content-Type": "application/json"},
"body": {
"animals": [
{
"name" : "Mary"
},{
"name" : 1
}
]
}
}
}