Closed livinglogic-nl closed 1 year ago
You can't specify an array matcher that has a minimum of 0 or maximum of 0. See https://docs.pact.io/faq#why-is-there-no-support-for-specifying-optional-attributes and #optional. If you want the array to have 0 elements, you don't need to use a matcher at all - simply specify the value as []
(or whatever equivalent your language expresses an empty array as).
I'm using pact_verifier_cli 0.9.19 with a version 3 PACT file. I have matching rules as the following:
When verifying this and the response has an array of multiple items, it still gets verified. Is this expected behaviour?