Skip to content

fix(ffi): pad a min-type array example to the minimum length - #24

Open
YOU54F wants to merge 1 commit into
masterfrom
fix/ffi-min-array-example
Open

YOU54F wants to merge 1 commit into
masterfrom
fix/ffi-min-array-example

Conversation

@YOU54F

@YOU54F YOU54F commented Nov 9, 2026

Copy link
Copy Markdown
Owner

Commits

fix(ffi): pad a min-type array example to the minimum length

An integration JSON matcher such as
{"pact:matcher:type":"type","min":2,"value":[{"id":1}]} produced a
one-item example, so the mock server returned a body that failed its own
min rule. The example array is now padded to min by repeating the last
item, which matches the Ruby core and pact-jvm DSLs. Empty examples and
examples that already meet the minimum are left unchanged.

Fixes pact-foundation/pact-net#522

🤖 Generated with Claude Code

An integration JSON matcher such as
`{"pact:matcher:type":"type","min":2,"value":[{"id":1}]}` produced a
one-item example, so the mock server returned a body that failed its own
min rule. The example array is now padded to `min` by repeating the last
item, which matches the Ruby core and pact-jvm DSLs. Empty examples and
examples that already meet the minimum are left unchanged.

Fixes pact-foundation/pact-net#522

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.

MinType always returning just one element

1 participant