pact-foundation / pact-specification

Describes the pact format and verification specifications
MIT License
295 stars 28 forks source link

matching clarification #59

Open 0xorial opened 6 years ago

0xorial commented 6 years ago

I am working on .net port of pact. There is something unclear to me.. Assume I have a following test case:

{
  "match": true,
  "comment": "top level array matches",
  "expected": {
    "headers": {"Content-Type": "application/json"},
    "body" : [ {
      "dob" : "06/11/2015",
      "name" : "Rogger the Dogger",
      "id" : "a_string",
      "timestamp" : "2015-06-11T13:17:29"
    }, {
      "dob" : "06/11/2015",
      "name" : "Cat in the Hat",
      "id" : 1284270029,
      "timestamp" : "2015-06-11T13:17:29"
    } ],
    "matchingRules" : {
      "$.body[*].id" : {
        "match" : "type"
      }
    }
  },
  "actual": {
    "headers": {"Content-Type": "application/json"},
    "body": [
      {
        "dob": "11/06/2015",
        "name": "Bob The Builder",
        "id": 1234567890,
        "timestamp": "2000-06-10T20:41:37"
      },
      {
        "dob": "12/10/2000",
        "name": "Slinky Malinky",
        "id": "a_string",
        "timestamp": "2015-06-10T22:98:78"
      },
      {
        "dob": "12/10/2000",
        "name": "Jerry Smith",
        "id": "a_string",
        "timestamp": "2015-06-10T22:98:78"
      }
    ]
  }
}

Which result is it going to produce and why?

bethesque commented 6 years ago

Before you jump in and start on a new .net port, can I ask you to join slack.pact.io and have a discussion with the current maintainers, and find out our longer term plans for the current .net implementation?