node-consumer-pact-validation
Version:
A consumer pact generator written for pure nodeJS
27 lines • 574 B
JSON
{
"match": true,
"comment": "Requests match with regex",
"expected" : {
"headers": {"Content-Type": "application/json"},
"matchingRules": {
"$.body.alligator.name": {"match": "regex", "regex": "\\w+"}
},
"body": {
"alligator":{
"name": "Mary",
"feet": 4,
"favouriteColours": ["red","blue"]
}
}
},
"actual": {
"headers": {"Content-Type": "application/json"},
"body": {
"alligator":{
"feet": 4,
"name": "Harry",
"favouriteColours": ["red","blue"]
}
}
}
}