Repository navigation
Conversation
Matchers in integration JSON can now be combined with OR using the `pact:matcher:combine` attribute. The rules are written to the pact file as an existing rule list combined with OR, so the pact file format is unchanged.
…h's rules with different logic add_rule_list_to_category used to append OR rules to an existing AND list (or the reverse), silently changing how the existing rules are combined. Rules with a different logic now replace the existing ones with a warning, as Pact-JVM's `or` DSL does, and rules with the same logic are appended. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* The `or` action folded its results from OK, so it never failed. It now folds from the first child result. * Errors from the branches of a successful `or` are no longer reported as mismatches. * An object with rules combined with OR that include a null matcher now accepts a null value, and only checks the object's entries when the value is not null (new `json:not-null` action). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…mbined with OR Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…lues for pact:matcher:combine * The combine value is not case-sensitive, and an invalid value writes null. * Rules inside an object value still apply to its children (null-or-object). * An OR matcher whose value is another matcher replaces that matcher's rules, with a warning, as Pact-JVM's or matcher does. * Remove the V2 matching engine limitation, now that it supports OR. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Draft, stacked. This includes the commits from #28 (engine) and #29 (FFI). Only the compat-scenarios commit is new here. The scenarios are also raised against the suite as YOU54F/pact-compatibility-suite#4.
Commits
feat(ffi): support pact:matcher:combine OR in integration JSON
Matchers in integration JSON can now be combined with OR using the
pact:matcher:combineattribute. The rules are written to the pact file asan existing rule list combined with OR, so the pact file format is unchanged.
fix(ffi): replace existing rules when integration JSON combines a path's rules with different logic
add_rule_list_to_category used to append OR rules to an existing AND list (or the
reverse), silently changing how the existing rules are combined. Rules with a
different logic now replace the existing ones with a warning, as Pact-JVM's
orDSL does, and rules with the same logic are appended.fix(matching): support rules combined with OR in the V2 matching engine
oraction folded its results from OK, so it never failed. It nowfolds from the first child result.
orare no longer reported asmismatches.
accepts a null value, and only checks the object's entries when the
value is not null (new
json:not-nullaction).test(compat): add compatibility suite scenarios for matching rules combined with OR
docs(ffi): document nullable objects, wrapped matchers and invalid values for pact:matcher:combine
with a warning, as Pact-JVM's or matcher does.
🤖 Generated with Claude Code