Skip to content

"Keyword is present" meaning #1161

Closed
@yakimun

Description

@yakimun

In the current draft, some keywords behavior depends on the presence and annotation results of keywords from other vocabularies.

Example:
https://json-schema.org/draft/2020-12/json-schema-validation.html#rfc.section.6.4.4

If "contains" is not present within the same schema object, then this keyword has no effect.

An instance array is valid against "maxContains" in two ways, depending on the form of the annotation result of an adjacent "contains" keyword. The first way is if the annotation result is an array and the length of that array is less than or equal to the "maxContains" value. The second way is if the annotation result is a boolean "true" and the instance array length is less than or equal to the "maxContains" value.

If the Applicator vocabulary isn't used to process the current schema, but the "contains" property exists in the schema object, should an implementation consider it as presented? If yes, then we will have annotation produced by the unknown keyword "contains" with an arbitrary value. Such a case isn't considered in the description of the "maxContains" keyword.

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