Skip to content
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

fix: values matcher doesn't work if values is array with keys #356

Merged
merged 1 commit into from
Oct 31, 2023

Conversation

tienvx
Copy link
Contributor

@tienvx tienvx commented Oct 28, 2023

  • On consumer: example values will be array with keys:
     'values' => Array (
-        0 => 'a'
-        1 => 'bb'
-        2 => 'ccc'
+        'a' => 'a'
+        'b' => 'bb'
+        'c' => 'ccc'
     )
  • On provider: got this error on verification:
Failures:

1) Verifying a pact between matchersConsumer and matchersProvider Given Get Matchers - A get request to /matchers
    1.1) has a matching body
           $.values -> Type mismatch: Expected ["a","bb","ccc"] (Array) to be the same type as {"a":"a","b":"bb","c":"ccc"} (Object)


@tienvx tienvx merged commit 61a48bf into pact-foundation:ffi Oct 31, 2023
26 checks passed
@tienvx tienvx deleted the values-matcher-values-only branch October 31, 2023 02:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants