From 08f20afd91c0d0ceab09d20308ca9b26db4617f2 Mon Sep 17 00:00:00 2001 From: WhyINeedToFillUsername Date: Mon, 28 Aug 2017 16:27:03 +0200 Subject: [PATCH] Updated description of byType testMatcher (#394) fixes #393 --- docs/src/main/asciidoc/verifier/contract.adoc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/src/main/asciidoc/verifier/contract.adoc b/docs/src/main/asciidoc/verifier/contract.adoc index 39f27c3fb6..a9893dc153 100644 --- a/docs/src/main/asciidoc/verifier/contract.adoc +++ b/docs/src/main/asciidoc/verifier/contract.adoc @@ -480,7 +480,8 @@ match the regex for ISO Time - `byType()` - the value taken from the response via the provided JSON Path needs to be of the same type as the type defined in the body of the response in the contract. `byType` can take a closure where you can set `minOccurrence` and `maxOccurrence`. -That way you can assert on the size of the collection. +That way you can assert on the size of the flattened collection. To check the size +of an unflattened collection, use a custom method via `byCommand(...)` testMatcher. - `byCommand(...)` - the value taken from the response via the provided JSON Path will be passed as an input to the custom method that you're providing. E.g. `byCommand('foo($it)')` will result in calling a `foo` method to which the value matching the JSON Path will get @@ -1199,4 +1200,4 @@ IMPORTANT: If you don't provide any implementation then the default one will be If you provide `repositoryRoot` property or `workOffline` flag then Aether based that will download stubs from a remote repo will be picked. If you don't provide these values then the `ClasspathStubProvider` will be picked that will scan the classpath. - If you provide more than one, then the first one on the list will be picked. \ No newline at end of file + If you provide more than one, then the first one on the list will be picked.