Repository navigation
Conversation
The V2 DSL passed a Content-Type header matcher's JSON to the FFI as the body content type. Use the matcher's example value, and the first value of a header given as an array. Fixes pact-foundation#1071 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
pact_ffi only reads matchers embedded in a JSON body, so a matcher on a text body was sent as its JSON and compared as a literal string. Send the example as the body and the matcher as a body rule. Generators can't be given this way, so a warning is logged when one is dropped. Fixes pact-foundation#1107 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The message provider proxy always sent the message as JSON, so a text message was verified as a JSON string. When the metadata gives a content type that is not JSON and the message is a string or Buffer, send it as it is with that content type. Fixes pact-foundation#1112 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rebased onto current master.
Commits
fix: use the example of a content type header matcher
The V2 DSL passed a Content-Type header matcher's JSON to the FFI as the
body content type. Use the matcher's example value, and the first value
of a header given as an array.
Fixes pact-foundation#1071
fix: send a matcher on a text body as matching rules
pact_ffi only reads matchers embedded in a JSON body, so a matcher on a
text body was sent as its JSON and compared as a literal string. Send
the example as the body and the matcher as a body rule. Generators
can't be given this way, so a warning is logged when one is dropped.
Fixes pact-foundation#1107
fix: send text messages with the content type from their metadata
The message provider proxy always sent the message as JSON, so a text
message was verified as a JSON string. When the metadata gives a content
type that is not JSON and the message is a string or Buffer, send it as
it is with that content type.
Fixes pact-foundation#1112
🤖 Generated with Claude Code