pact-foundation / pact-net

.NET 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://pact.io
MIT License
832 stars 230 forks source link

RFC: EachKey and EachValue Matcher #510

Open vineet2907 opened 2 months ago

vineet2907 commented 2 months ago

Pact v4 specification introduces several new matchers, EachKey and EachValue being two amongst them. EachKey allows defining rules against the keys in the collection, ignoring the values. EachValue allows defining rules against the values in the collection, ignoring the keys.

There are corresponding matchers added in pact-js (eachKeyMatches and eachValueMatches).

Is there any plan to introduce these new matchers in current/beta versions of pact-net ?

Until they are available, is there a way to create custom matchers in the latest version to support these matching rules?

adamrodger commented 1 month ago

There are a few matchers that have been added to the v4 spec after it was first published and currently some of those haven't been implemented. They're not difficult to add though.

There's no way to add custom matchers, no.