public PactDslJsonArray maxArrayLike ( Integer size , PactDslJsonRootValue value , int numberExamples ) { if ( numberExamples > size ) { throw new IllegalArgumentException ( String . format ( "Number of example %d is more than the maximum size of %d" , numberExamples , size ) ) ; } matchers . addRule ( rootPath + appendArrayIndex ( 1 ) , matchMax ( size ) ) ; PactDslJsonArray parent = new PactDslJsonArray ( rootPath , "" , this , true ) ; parent . setNumberExamples ( numberExamples ) ; parent . putObject ( value ) ; return ( PactDslJsonArray ) parent . closeArray ( ) ; }
Array of values with a maximum size that are not objects where each item must match the provided example