Hello. I have a question about `arrayContaining` ....
# pact-jvm
t
Hello. I have a question about
arrayContaining
. I need this logic for an array that is not defined as a value of an object property. Instead, the array is returned as the body of the response.
Copy code
[
  {....},
  {....}
]
Ideally, I would need a
newJsonArrayContaining
method in
LambdaDsl
. See an example below.
Copy code
return logAndReturn(builder.given("multiple connections exists")
				.uponReceiving("request to get all connections")
				.method("GET")
				.path("/connections")
				.headers(headers())
				.willRespondWith()
				.status(200)
				.headers(headers())
				.body(newJsonArrayContaining(arr -> {
					......
					});
				}).build()));
As I understand it, there is currently no way to use
arrayContaining
in this situation. Is my understanding correct?