-
-
Notifications
You must be signed in to change notification settings - Fork 479
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
"pactSpecificationVersion": "3.0.0" is not supported #917
Comments
"pactSpecification": {
"version": "3.0.0"
} is the correct format. What is generating the format with |
Can you explain why "pactSpecification": { is the correct format, but "pactSpecificationVersion": "3.0.0" is not. The JSON schema for pact seems to allow both. See: https://bitbucket.org/atlassian/pact-json-schema/src/master/schemas/v2/schema.json The class au.com.dius.pact.model.PactReader from pact-jvm currently supports only two of the three variants from the schema (pactSpecification and pact-specification, but not pactSpecificationVersion). |
We are using the Pact library "https://github.com/Mattersight/pact-net-messages" to implement the consumer part of a pact for messages in .NET core. This library is generating the "pactSpecificationVersion" variant. And as @mwohllebe mentioned there seems to be three possible valid variants to specify the pact version. :) |
Oh, right. Bit of history here. When Ben Sayers from Atlassian put together the JSON schemas for the pact file, he discovered that there where 3 variants of the pact spec version. I though we had discussed this and resolved to support the format from the Ruby implementation. But maybe we just talked about it and it was not implemented. Maybe Ben wanted the schema files to work with all the implementations out there. But Pact-Ruby (and Pact-JS, Pact-Go, Pact-.NET which use Pact-Ruby), Pact-JVM and Pact-Rust all use the same format. We should get "https://github.com/Mattersight/pact-net-messages" to do the same. |
@bethesque comments? |
Yup, Ron is spot on with the history. Please raise an issue to change the pact net messages library. |
Alright, I will do that. Thanks for clarification. :) |
As far as I understand the Pact Json Schema there are three different possibilities to specify the Pact specification version in a Pact file.
"metadata": {
"pactSpecificationVersion": "3.0.0",
"pact-specification": {
"version": "3.0.0"
},
"pactSpecification": {
"version": "3.0.0"
}
}
Unfortunately Pact-jvm seems not to support the first one “pactSpecificationVersion” when loading a Pact in a provider test. It always says that it can not find a Pact file. But after changing only the Pact specification version format to the last option “pactSpecification” it can find the Pact.
We are using “pact-jvm-provider-spring_2.12”.
Is it possible also to support the “pactSpecificationVersion” Option when loading a Pact from a broker and using it inside a provider test?
The text was updated successfully, but these errors were encountered: