Skip to content

feat(ffi): support pact:matcher:combine OR in integration JSON - #29

Open
YOU54F wants to merge 3 commits into
masterfrom
feat/ffi-combine-or
Open

YOU54F wants to merge 3 commits into
masterfrom
feat/ffi-combine-or

Conversation

@YOU54F

@YOU54F YOU54F commented Nov 9, 2026

Copy link
Copy Markdown
Owner

Split out of feat/or-matcher-improvements. Tests pass locally.

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: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.

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
or DSL does, and rules with the same logic are appended.

docs(ffi): document nullable objects, wrapped matchers and invalid values 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.

🤖 Generated with Claude Code

Sergey Shtubey and others added 3 commits November 9, 2026 18:56
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>
…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant