node-consumer-pact-validation
Version:
A consumer pact generator written for pure nodeJS
24 lines (23 loc) • 449 B
JSON
{
"match": true,
"comment": "Headers match with regexp",
"expected" : {
"method": "POST",
"path": "/path",
"headers": {
"Accept": "alligators",
"Content-Type": "hippos"
},
"matchingRules": {
"$.headers.Accept": {"match": "regex", "regex": "\\w+"}
}
},
"actual": {
"method": "POST",
"path": "/path",
"headers": {
"Content-Type": "hippos",
"Accept": "crocodiles"
}
}
}