-
Notifications
You must be signed in to change notification settings - Fork 215
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
Writing pact file results in non spec v3 compatible matching rules #157
Comments
Sorry, pact spec v3 is not supported in js yet. Which feature were you particularly interested in? |
The pact specification is not passed in when pact_mock-service calls the MatchingRules.extract function in pact-support https:/pact-foundation/pact-support/blob/master/lib/pact/matching_rules.rb#L11 I've added a commit and pull request that will pass the spec version used. pact-foundation/pact-mock_service#159 however the matching rules are written incorrectly. pact-message-ruby attempts to correct this here whereby it would write "matchingRules": {
"body": {
"$.email": {
"match": "type"
},
"$.first_name": {
"match": "type"
}
}
} but it should write "matchingRules": {
"body": {
"$.email": {
"matchers": [
{
"match": "type"
}
]
},
"$.first_name": {
"matchers": [
{
"match": "type"
}
]
}
}
} |
I'm using Pact-JS (+pact-js-karma) to test my consumer tests and want to generate Pact files according to version 3 of the Pact spec.
I think that I have set the spec option correctly, because the resulting pact file includes
The generated matching rules are in v2 format:
Our expectation regarding the generated output according to spec v3 was something like:
The text was updated successfully, but these errors were encountered: