Skip to content
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

Question: Can you combine Matchers with Integration JSON? #249

Open
orj opened this issue Jan 16, 2023 · 2 comments
Open

Question: Can you combine Matchers with Integration JSON? #249

orj opened this issue Jan 16, 2023 · 2 comments

Comments

@orj
Copy link

orj commented Jan 16, 2023

I have a question regarding matchers specified via the Pact FFI IntegrationJSON format.

Is there a way of combining matchers? From what I understand matchers can be combined in terms of "AND" and "OR" semantics. So it would be cool to specify say a bit of a response or request was both "a string" and also must be not empty. Eg, an "AND" combine of the "type" and "notEmpty" matchers.

Can this be done via the "Integration JSON" method?

@orj orj changed the title Question: Combine Matchers with Integration JSON Question: Can you combine Matchers with Integration JSON? Jan 16, 2023
@rholshausen
Copy link
Contributor

Unfortunately, the Pact FFI Integration JSON format only allows specifying a single matcher. However, as part of the plugins work we developed a matching rule expression language, which does allow multiple matchers. We could update the JSON format to support the expressions.

@YOU54F
Copy link
Member

YOU54F commented Jun 9, 2024

Does #405 resolve this at least for the AND case

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

No branches or pull requests

4 participants