-
Notifications
You must be signed in to change notification settings - Fork 53
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
matching on path #186
Comments
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 of
Some(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!
The text was updated successfully, but these errors were encountered: