We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When I currently do:
val matchers = new PactDslJsonBody().minArrayLike("foo", 2) .stringMatcher("bar", "[a-z0-9]+", "abc") .integerType("baz", 666) .close()
The body for the example will have a foo array, with 2 identical examples: {"bar": "abc", "baz": 666}.
foo
{"bar": "abc", "baz": 666}
I'd like to be able to define multiple example values, e.g. like this:
val matchers = new PactDslJsonBody().minArrayLike("foo", 2) .stringMatcher("bar", "[a-z0-9]+", List("abc", "def")) .integerType("baz", List(666, 90210)) .close()
So that I'll get a body similar to:
{ "foo": [ {"bar": "abc", "baz": 666}, {"bar": "def", "baz": 90210} ] }
The text was updated successfully, but these errors were encountered:
feat: support specifying multiple example values in Java DSL #379
5bac92c
I've updated the DSL to use multiple values with varargs:
PactDslJsonBody body = new PactDslJsonBody() .minArrayLike('foo', 2) .stringMatcher('bar', '[a-z0-9]+', 'abc', 'def') .integerType('baz', 666, 90210) .close()
This now generates:
{ "foo": [ {"bar":"abc","baz":666}, {"bar":"def","baz":90210} ] }
Sorry, something went wrong.
No branches or pull requests
When I currently do:
The body for the example will have a
foo
array, with 2 identical examples:{"bar": "abc", "baz": 666}
.I'd like to be able to define multiple example values, e.g. like this:
So that I'll get a body similar to:
The text was updated successfully, but these errors were encountered: