node-consumer-pact-validation
Version:
A consumer pact generator written for pure nodeJS
30 lines (29 loc) • 574 B
JSON
{
"match": true,
"comment": "Requests match with regex",
"expected" : {
"method": "POST",
"path": "/",
"query": "",
"headers": {"Content-Type": "application/json"},
"matchingRules": {
"$.body['2'].str": {"match": "regex", "regex": "\\w+"}
},
"body": {
"2" : {
"str" : "jildrdmxddnVzcQZfjCA"
}
}
},
"actual": {
"method": "POST",
"path": "/",
"query": "",
"headers": {"Content-Type": "application/json"},
"body": {
"2" : {
"str" : "saldfhksajdhffdskkjh"
}
}
}
}