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?
While implementing
$vocabulary, I noticed that the$schemaof optionalformattests for draft 2020 point tohttps://json-schema.org/draft/2020-12/schema, which contains a$vocabularysection with:{ "https://json-schema.org/draft/2020-12/vocab/format-annotation": true }Which seems to explicitely tell that
formatare annotations rather than assertions, hence any conformant validator should ignore these, thus all tests values should yieldtrue.It seems that it would be more logical to use some
https://json-schema.org/draft/2020-12/schema-with-format(or similar)$schemawith:{ "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?