public static PactDslJsonArray arrayMinLike ( int minSize , int numberExamples , PactDslJsonRootValue value ) { if ( numberExamples < minSize ) { throw new IllegalArgumentException ( String . format ( "Number of example %d is less than the minimum size of %d" , numberExamples , minSize ) ) ; } PactDslJsonArray parent = new PactDslJsonArray ( "" , "" , null , true ) ; parent . setNumberExamples ( numberExamples ) ; parent . matchers . addRule ( "" , parent . matchMin ( minSize ) ) ; parent . putObject ( value ) ; return parent ; }
Root level array with minimum size where each item must match the provided matcher