Skip to content

fix(ffi): keep JSON header/query values without matchers, and honour generator-only values - #22

Open
YOU54F wants to merge 1 commit into
masterfrom
fix/ffi-integration-json-literals
Open

YOU54F wants to merge 1 commit into
masterfrom
fix/ffi-integration-json-literals

Conversation

@YOU54F

@YOU54F YOU54F commented Nov 9, 2026

Copy link
Copy Markdown
Owner

Commits

fix(ffi): keep JSON header/query values without matchers and honour generator-only values

from_integration_json_v2 (path, query, header values) only looked for
pact:generator:type inside the matcher branch, and fell back to
map["value"] for any other JSON object. A header such as
X-Meta: {"alg":"HS256","typ":"JWT"} was stored as "", and a
ProviderState generator without a matcher was dropped.

  • A JSON object with pact:generator:type but no matcher now registers
    the generator and uses its value as the example.
  • A JSON object with no pact:* keys is kept as the string as written.
  • bodies.rs process_object now dispatches generator-only objects to
    process_matcher, so the generator is registered and value is used.

Fixes pact-foundation/pact-js#1058, pact-foundation#448
and the generator-only part of pact-foundation/pact-js#1088.

🤖 Generated with Claude Code

…enerator-only values

from_integration_json_v2 (path, query, header values) only looked for
pact:generator:type inside the matcher branch, and fell back to
map["value"] for any other JSON object. A header such as
X-Meta: {"alg":"HS256","typ":"JWT"} was stored as "", and a
ProviderState generator without a matcher was dropped.

- A JSON object with pact:generator:type but no matcher now registers
  the generator and uses its value as the example.
- A JSON object with no pact:* keys is kept as the string as written.
- bodies.rs process_object now dispatches generator-only objects to
  process_matcher, so the generator is registered and value is used.

Fixes pact-foundation/pact-js#1058, pact-foundation#448
and the generator-only part of pact-foundation/pact-js#1088.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

Header is parsed incorrectly

1 participant