Open dnozay opened 9 months ago
Plugin matchers are different to the regular pact core matchers.
gh docs: https://github.com/pact-foundation/pact-plugins/blob/main/docs/matching-rule-definition-expressions.md website docs: https://docs.pact.io/implementation_guides/pact_plugins/docs/matching-rule-definition-expressions
syntax sugar would be nice to create a typed DSL but this would need to be considered potentially for all plugins, so the raw untyped approach is the trade off
Hello - thank you for your work on the project!
Here are the matching rules that I thought would work everywhere https://github.com/pact-foundation/pact-plugins/blob/main/docs/matching-rule-definition-expressions.md
The
pact-go
repo has quite a lot of testcases.syntax supported
I see discrepancies between the 2 syntax supported.
example in pact-protobuf-plugin's readme
example syntax in pact-go's matching test code
matching on maps
EachKeyLike(key, template)
You could define a test like
So I don't know if I'm just looking at way old docs in
pact-go
and just expecting similar syntax to work everywhere, including withpact-protobuf-plugin
or if that's an area where we could improve.for context, in case someone wants to spend time fixing it
ideal situation (for me)
https://github.com/pact-foundation/pact-go/blob/master/examples/consumer_v4_test.go
I really liked the builder approach and the different matchers that are there for the HTTP side of things / plain json:
and I wish we had the same syntax sugar for GRPC interactions.