node-consumer-pact-validation
Version:
A consumer pact generator written for pure nodeJS
30 lines • 513 B
JSON
{
"match": true,
"comment": "array with regex matcher",
"expected": {
"headers": {},
"body" : {
"myDates": [
"29/10/2015"
]
},
"matchingRules" : {
"$.body.myDates": {
"match": "type"
},
"$.body.myDates[*]" : {
"match": "regex", "regex" : "\\d{2}/\\d{2}/\\d{4}"
}
}
},
"actual": {
"headers": {},
"body": {
"myDates": [
"01/11/2010",
"15/12/2014",
"30/06/2015"
]
}
}
}