Another question for y'all! I'm using the pact pro...
# pact-plugins
b
Another question for y'all! I'm using the pact protobuf plugin in my consumer test, and I would like to use a matcher for the response (the provider service returns a random uuid). As best I can tell,
.UsingPlugin
returns a
SynchronousMessageWithPlugin
type, which only allows
.WithContents
to be called on it; since
.WithContents
takes a stringified blob of JSON, I assume it doesn't support using matchers (e.g.). If someone can verify that understanding and/or help me come up with an alternative solution, that would be great!
y
Hey hey, that is correct as they can’t be serialised and sent over the wire to the grpc server (plugin) so an alternative mechanism was introduced https://github.com/pact-foundation/pact-plugins/blob/main/docs/matching-rule-definition-expressions.md these are the plugin supported matchers
b
oh cool! sorry for missing that – I hadn't seen that doc before
i'll give it a try and report back!
y
b
yeah i think i was looking at the matchers examples on GH (which is for http) and the grpc examples on GH (which don't have matchers)