Inspired by this SO question.
We have contains to verify that at least one item in an array matches a subschema. And through additionalProperties and patternProperties we recognize that objects can have dynamic properties.
It seems like we should have a way to specify that at least one property matches a subschema.
It could make sense to extend contains to do this when it receives an object, or we could define a new keyword. If we extend contains, then minContains and maxContains would naturally follow. format (in all its glory) already works on multiple value types, so it's not something we haven't had before.
Inspired by this SO question.
We have
containsto verify that at least one item in an array matches a subschema. And throughadditionalPropertiesandpatternPropertieswe recognize that objects can have dynamic properties.It seems like we should have a way to specify that at least one property matches a subschema.
It could make sense to extend
containsto do this when it receives an object, or we could define a new keyword. If we extendcontains, thenminContainsandmaxContainswould naturally follow.format(in all its glory) already works on multiple value types, so it's not something we haven't had before.