json-schema-org / json-schema-org/JSON-Schema-Test-Suite
Possibly inconsistent `$schema` for optional `format` tests ?
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 750
- Forks
- 307
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 24
Description
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?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review the optional format tests for drafts 2020 and 2019, focusing on their $schema values and the referenced $vocabulary entries. Check the JSON Schema format assertion expectations first; done means the test metadata consistently communicates whether format values should be accepted or rejected.
Written by the indexing model from the issue text.
Assessment
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100