pact-foundation / pact_broker

Enables your consumer driven contracts workflow
http://pactflow.io
MIT License
708 stars 174 forks source link

Pact-Broker does not view Pacts with query matching #241

Open dervism opened 6 years ago

dervism commented 6 years ago

Pre issue-raising checklist

I have already (please mark the applicable with an x):

Software versions

Pact-Broker 2.24 to 2.27. Seeing same behaviour on the hosted Pact-Broker as well as my self hosted one. The hosted broker is running v2.24.0 (*.pact.dius.com.au)

Pact-JVM 3.5.23

Expected behaviour

Should show Pacts with query matching (v3 spec).

Actual behaviour

After upgrading to latests Pact-Broker my Pact is not visualised correctly. When I view pacts that has query maching, I get the following message at the top of the page:

"Note: this contract could not be parsed to a v1 or v2 Pact, showing raw content instead."

Downgrading to Pact-Broker 2.23 visualised the Pact correctly.

Steps to reproduce

See method "hasOnePersonQueryParam(...)" in this source file:

https://github.com/dervism/person-consumer/blob/master/src/test/java/no/dervis/pact/PersonServiceTest.java

The Pact is visualised correctly if I publish the Pact without the above mentioed method that has the query matching.

Relevent log files

person-consumer-person-provider.txt

bethesque commented 6 years ago

This surprises me, as I didn't think the broker ever supported rendering v3 pacts!

bbarke commented 5 years ago

I'm also seeing this issue. I upgraded from v2.24 to v2.27 and some of the pacts are displaying the same thing as described above.

tsayen commented 4 years ago

Hi, is this still a missing feature? I'm using version 2.43.0, and the problem seems to be still there. @bethesque would you review a pull request that would fix this?

bethesque commented 4 years ago

Yes, I would happily accept a PR.

Because I can't reproduce this issue myself, I need someone to submit a pact that causes the issue. I don't know which particular part of the v3 spec it's not parsing properly.

JEFFTheDev commented 2 years ago

Has a sufficient pull request been made as of this day? I'm running into the same issue.

testifyqa commented 2 years ago

Also running into this issue :(

ppetershagen commented 2 years ago

Same issue here with a message pact with matchingRules,

  "metadata": {
    "pactSpecification": {
      "version": "3.0.0"
    },
    "pact-jvm": {
      "version": "3.6.15"
    }
  }

on a pact-broker-docker 2.93.2.0