This PR adds support for restricting the elements generated in collection from default 2 to 1 element based upon the schema size. Current threshold for this is for schemas larger than 50 KB.
Solution
We've removed the part where minItems and maxItems were had coded into schema while resolution and added support for this in json-schema-faker library. In jsf library we've added similar logic by usage of options that can be configured while using this library. And while faking the schema, we use these options depending upon the schema size.
Overview
This PR adds support for restricting the elements generated in collection from default 2 to 1 element based upon the schema size. Current threshold for this is for schemas larger than 50 KB.
Solution
We've removed the part where
minItems
andmaxItems
were had coded into schema while resolution and added support for this injson-schema-faker
library. In jsf library we've added similar logic by usage of options that can be configured while using this library. And while faking the schema, we use these options depending upon the schema size.