pact-foundation / pact-jvm

JVM version of Pact. Enables consumer driven contract testing, providing a mock service and DSL for the consumer project, and interaction playback and verification for the service provider project.
https://docs.pact.io
Apache License 2.0
1.07k stars 473 forks source link

`numExamples` matchers expect PactDslRootValue instead of PactDslPart #1799

Open timvahlbrock opened 1 month ago

timvahlbrock commented 1 month ago

The array matchers that allow for numExamples and the item matcher to be passed, like https://github.com/pact-foundation/pact-jvm/blob/0131eb2e8cb197faf57df06164bbefd6ab1a713a/consumer/src/main/kotlin/au/com/dius/pact/consumer/dsl/PactDslJsonBody.kt#L1463 expect a PactDslRootValue instead of the PactDslPart for the item matcher. I don't see why this limitation is necessary, the value is only used in a call that itself expects a PactDslPart. Other array matchers use PactDslRootValue as well.