Skip to content
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

Request matching with an array in the body #25

Open
abhayachauhan opened this issue Aug 27, 2015 · 3 comments
Open

Request matching with an array in the body #25

abhayachauhan opened this issue Aug 27, 2015 · 3 comments

Comments

@abhayachauhan
Copy link

We have a request which has an array at the top level of the body which I am unable to perform a type match on.
For example:

        .withRequest({
            method: 'post',
            path: '/xxx/en',
            body: {
                  "json_class": "Pact::SomethingLike",
                    "contents": ["REVISION_HISTORY"]
               }
             })

This request only matches request with ["REVISION_HISTORY"] in the body and not all arrays.

@bethesque
Copy link
Member

Please follow these instructions: https://github.com/realestate-com-au/pact/wiki/v2-flexible-matching

@abhayachauhan
Copy link
Author

This being a pact spec v2 feature.
Is PACT Mock Service PACT v2 compliant?

@bethesque
Copy link
Member

Yes. If you are starting it from the command line, you'll need to give it the command line option, can't remember what it is off the top of my head, it'll be in the help output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants