-
Notifications
You must be signed in to change notification settings - Fork 19
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
Hosted Stubs - matchQuery() not working as expected with v2 contracts #27
Comments
Hey @rebutler97! This probably isn't the right repo, but not sure where the right one would be for this at the moment? maybe our public roadmap https://github.com/pactflow/roadmap Anyway that probably doesn't help you for now, so let's not worry about that - there is an internal ticket the dev team will track I don't mind helping out for the time being! A few things that would be useful for me and others if they wish to help. I assume you are writing a test, with pact jvm, which is generating a v2 contract. This is being uploaded to Pactflow, and you are trying to access that with something?
Related slack post in pact-jvm https://pact-foundation.slack.com/archives/C9UN99H24/p1666709918005809 |
Apologies for delay, I just forked and pushed minor changes: https://github.com/rebutler97/example-consumer-java-junit-queryparams
Also, because our Pactflow is hosted within our company, I am unable to share a working curl command. However, it should look something like this: |
Is this enough information to look into? |
Hi @rebutler97 - apologies I missed this, we don't track issues on the test examples in the same way as product backlog. Apologies for any confusion. The issue is in the open source component I've raised the bug there: pact-foundation/pact-mock_service#140 I'll close this one off so we can follow appropriately. |
Hi, I'm hoping that I raised this issue under the correct repository. I already raised this in slack.pact.ioand I was told to raise an issue to track. There was also an internal Jira raised to look into.
We are trying to get Pact JVM's matchQuery() to work with PactFlow's Hosted Stubs. Because matching rules are a requirement for is, we are using Pact v2 contracts.
In our efforts to try and get dynamic query parameters working, we are facing the below error:
For reference, we have tried both of the two ways (one including a custom example, and the other not):
Here is the relevant part of the contract that was generated:
We were facing similar issues with matchPath() when we were not including the example, but including the custom example worked in that case.
Has anyone gotten this feature working with v2 contracts? Am I missing something?
I have tried workarounds like adding an extra bracket and quotes to the regular expression, but a) that is not ideal and b) it still didn't work. Any guidance would be much appreciated.
The text was updated successfully, but these errors were encountered: