-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat/composing matching rules #405
Conversation
As I was in that space, I also added support for the matching rule definition expressions. So you can also do {
"pact:matcher:type": "eachKey(matching(regex, '\\w{3}-\\d+', 'AUK-155332')), eachValue(matching(type, ''))",
} Just note that using references ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks all pretty sensible to me.
Should the compatibility suite also be updated to make sure downstream libraries consistently use these?
This is more an implementation detail. The language implementations can choose to use this form or use the FFI functions directly. The compatibility suite should assert the behavior, regardless. |
Yeah it was more the point of being able to add multiple matchers to a single field. Ditto expressions. This looks good though! |
Implements #399
TLDR - This allows an array to be specified with the
pact:matcher:type
attribute to be able to have multiple matching rules.For example, you could do something like (just making this up, may not be valid):