GitHub
02/28/2024, 12:42 AMmetaData present in the consumer contract is verified.
It would be great if we could also use matches when verifying metadata.
Something like this should be working.
"messages": [
{
"matchingRules": {
"body": {},
"metaData": {
"$.traceId": { "combine": "AND", "matchers": [{ "match": "type" }] }
}
},
"metaData": {
"traceId": "8bf558a2-0b0d-457e-b1b2-75800352d637"
}
}
]
Use case
The metaData object contains a traceId which is change whenever the consumer contract is published. The verification should just make sure that the field exists and carries a string. A match by value is not useful.
pact-foundation/pact-jsGitHub
02/28/2024, 12:42 AM