Skip to content

Possibly inconsistent $schema for optional format tests ? #885

@zx80

Description

@zx80

While implementing $vocabulary, I noticed that the $schema of optional format tests for draft 2020 point to https://json-schema.org/draft/2020-12/schema, which contains a $vocabulary section with:

{
    "https://json-schema.org/draft/2020-12/vocab/format-annotation": true
}

Which seems to explicitely tell that format are annotations rather than assertions, hence any conformant validator should ignore these, thus all tests values should yield true.

It seems that it would be more logical to use some https://json-schema.org/draft/2020-12/schema-with-format (or similar) $schema with:

{
    "https://json-schema.org/draft/2020-12/vocab/format-assertion": true
}

So that validators are at least expected to consider formats, thus reject some of the test values?
There is a similar issue with draft 2019.

Am I missing something?

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