If the schema specifies an array (or set) with a min value greater than 5, and no max value, that constraint is effectively ignored, and min and max both become 5. This is due to the following:
One way to remedy this might be: if the schema provides min but not max, set the effective max to min (or min plus some reasonable delta). 5 could remain as a sensible default, but only for when neither constraint is set.
If the schema specifies an array (or set) with a min value greater than 5, and no max value, that constraint is effectively ignored, and min and max both become 5. This is due to the following:
One way to remedy this might be: if the schema provides min but not max, set the effective max to min (or min plus some reasonable delta). 5 could remain as a sensible default, but only for when neither constraint is set.
Example from Node REPL: