question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

pact-jvm matching response body by only types

See original GitHub issue

By generating the contract with javascript, we are able to only verify the response body by types, not literally by value

				"matchingRules":{
					"$.body":{
						"match":"type"
					}
				}
			}

Are we able to achieve this by pact-jvm-consumer-junit_2.12?

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
mefellowscommented, Nov 27, 2020

Oh yes upon re-reading it I think you are right. I haven’t had my coffee yet 😃

0reactions
uglyogcommented, Nov 28, 2020

BTW, pact-jvm-consumer-junit_2.12 is a old version. The latest versions have been renamed to au.com.dius:pact-jvm-consumer-junit:4.0.10 for 4.0.x and au.com.dius.pact.consumer:junit:4.1.11 for 4.1.x onwards

Read more comments on GitHub >

github_iconTop Results From Across the Web

Matching requests and responses with Pact-JVM | Pact Docs
JSON body matching rules​. Bodies consist of Objects (Maps of Key-Value pairs), Arrays (Lists) and values (Strings, Numbers, true, false, ...
Read more >
Matching against empty body · Issue #85 · pact ... - GitHub
It is treating a missing body (i.e. no body attribute in the pact file) as different as an empty body. This should not...
Read more >
PACT jvm matching rules are being ignored when running test
Just change the content type and then the body will be parsed as a JSON document and the matchers will be applied to...
Read more >
PACT JVM Example | ArXmanS
By the time this example is created, PACT JVM Junit provides 3 ways to write the ... whether we check the response body's...
Read more >
question on array matching in pact-jvm - Google Groups
Hi Natasha,. The eachLike matcher is assuming there is an object at the root of the body. Can you raise an issue for...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found