pact-specification
pact-specification copied to clipboard
Assure property exists
I'm not very satisfied with the matchers. With current matchers it's possible to say that if a property exists it has to be of a special type or must have a special content, but it's not possible to assure, that the property has to exist at all. For example, how would you assure with matchers that with
body: {
"abc": "def"
}
property "abc" is a string and must be present in the body?
matching rule
"$.body.*":
{
"match": "type"
},
would not give an error, if only
{}
is sent.