This is a general question about matching, but app...
# general
e
This is a general question about matching, but applies to Pact-JVM. How do I specify/match an empty JSON array. We have a response that looks like:
Copy code
{
  "destinations": [],
  "cities": [],
  "airports": [
    {
      "code": "MSY",
      "name": "Louis Armstrong New Orleans International Airport"
    }
  ]
}
I want to match that "destinations" and "cities" are indeed empty lists. I am trying to use
maxArrayLike("destinations", 0, example)
but I get an error on the Consumer test complaining that I either cannot leave that field empty, or that the example of 1 doesn't match the expected size of 0.
I just found that minArrayLike also has a "numberOfExamples" parameter, which I set to zero, and seems to solve the issue.