Open metaflow opened 7 years ago
The Content-Type
header is a bit special in that it is used to determine what matching implementation to apply. So changing it has the side effect that you change the matching. The DSLs (like .body(PactDslJsonRootValue.stringMatcher(".*", "any"))
) work with specific content types and change the expected header, so the matcher you setup is probably being removed.
I also agree that the comment on match should reflect that a matcher was used, instead of the example value.
👋 Thanks, this ticket has been added to the PactFlow team's backlog as PACT-615
I am trying to create a pact when provider is free to specify any
content-type
but have to provide one.part of generated json:
I am running pact-jvm-provider-junit test with http target.
Test passes but comment on match is
while it is not true and it's better to indicate that it matched
.*
. But that is not a real issue.Now, if I add body matcher like
.body(PactDslJsonRootValue.stringMatcher(".*", "any"))
then several things broke:"body": "\"any\"",
(it's probably similar to #385)Expected a response type of 'application/pdf' but the actual type was 'application/xml'
(server responded with xml all that time).