Hi Everyone. I am having some trouble understandin...
# pact-jvm
j
Hi Everyone. I am having some trouble understanding how to combine matchers with OR/AND. Maybe I have misunderstood, but I was hoping I could use this to specify that we expect either attribute A to be present OR attribute B. Is this possible? If so, how do I specify it? I have tried like this:
Copy code
root.stringType("requestedProductionDateFrom", "2024-03-20T00:00:00Z")
        .or("calculatedProductionDateFrom", "2024-03-20T00:00:00Z");
root.stringType("requestedProductionDateTo", "2024-03-02T17:15:00Z")
        .or("calculatedProductionDateTo", "2023-03-02T17:15:00Z");
But, both attributes are filled in the example data generated, and the matching rules does not look correct :
Copy code
"$.calculatedProductionDateFrom": {
  "combine": "OR",
  "matchers": [

  ]
},
"$.calculatedProductionDateTo": {
  "combine": "OR",
  "matchers": [

  ]
t
What are you trying to do? See howtooptional
t
Oh, I see you posted the other thread we replied to as well. Sorry for the double up