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

Question: How do I get "matchingRules" in a consumer Pact file? #5

Open
KarinBerg opened this issue Jul 31, 2019 · 0 comments
Open

Comments

@KarinBerg
Copy link

I wrote a test to generate a consumer Pact file. Unfortunately the "matchingRules" are missing and I have no idea how to integrate them? Could someone give me a hint?

Here an example of what I miss:

...
  "messages": {
      "description": "ThingUpdatedEvent",
      "metaData": {
        "type": "ThinkUpdated"
      },
      "contents": {
          "id": "some id",
          "updatedAt": "20190114T12111869Z",
      },
      "providerStates": [
        {
          "name": "a thing was updated"
        }
      ],
      "matchingRules": {
          "body": {
            "$.id": {
              "matchers": [
                {
                   "match": "type"
                }
              ],
             "combine": "AND"
           },
           "$.updatedAt": {
              "matchers": [
              {
                  "match": "regex",
                  "regex": "\\d{8}T\\d{6,9}Z"
              }
            ],
            "combine": "AND"
          }
        }
      }
...
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

1 participant