Open Liorba opened 3 years ago
Hi @Liorba. Path matching as you've described isn't supported by scala-pact, as we currently follow the v2 pact spec where paths must be an exact string match. I would suggest using some dummy id for all of you test cases instead.
Addendum: support could be added as part of the "non-strict" matching flow (which doesn't conform completely to the pace spec)
Thanks for your answer @jbwheatley. when are you planning to add the support for v3?
I'm afraid it's not even on my radar at the moment. Its mainly just me actively maintaining things and my current focus is on slowly adding support for all the v2 features we are currently missing.
hello, I'm wondering if it possible to add matching rules on path/uri. for example, I a provider service which accept GET request with id in the path
foo/bar/:id
I want the stubbed server to ignore the actual id I send from my consumer service. I saw that currently there is only matching rule on body and headers, but not on path although the pact v3 spec allows that. I tried to add a custom rule to my "interaction" in the form ofSome(List(ScalaPactMatchingRuleRegex("$.path", "/foo/bar/\\d+")))
but id didn't work.if this is indeed possible, I would love your help on who to achieve this Thanks!