Skip to content

Object-based contains #1077

Closed
Closed
@gregsdennis

Description

@gregsdennis

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions