Repository navigation
Limit the unknown keyword annotation test to 2020-12 and later - #1236
Merged
jdesrosiers merged 2 commits intoOct 31, 2026
Merged
Conversation
json-schema-org#1229 made the case apply to 2019-09, but unknown keywords only produce annotations starting with 2020-12. In 2019-09 they SHOULD be ignored, and the x- prefix as an implicit annotation keyword is new in v1. Add a check that cases asserting an x- keyword annotation don't apply to earlier dialects.
jdesrosiers
requested changes
Oct 23, 2026
jdesrosiers
left a comment
Member
There was a problem hiding this comment.
Thanks for catching that. Drop the check_validation_suite.py changes. That's the validation suite only.
Contributor
Author
|
Done, dropped the |
jdesrosiers
approved these changes
Oct 31, 2026
jdesrosiers
pushed a commit
that referenced
this pull request
Nov 4, 2026
* Limit the unknown keyword annotation test to 2020-12 and later #1229 made the case apply to 2019-09, but unknown keywords only produce annotations starting with 2020-12. In 2019-09 they SHOULD be ignored, and the x- prefix as an implicit annotation keyword is new in v1. Add a check that cases asserting an x- keyword annotation don't apply to earlier dialects. * Drop the annotation check from the validation suite checker
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#1229 changed the
x-unknownKeywordcase inannotations/tests/unknown.jsonto"compatibility": "2019", on the basis thatx-keywords are implicit annotation keywords in 2019-09. As far as I can tell that only holds for v1. 2019-09 doesn't mention anx-prefix, and says unknown keywords should be ignored:Annotations for unknown keywords start with 2020-12 (Core 6.5: "Implementations SHOULD treat keywords they do not support as annotations"; the release notes say implementations "should now include annotations for unknown keywords"), and the v1 draft makes
x-keywords implicit annotation keywords. With"2019", a 2019-09 implementation that ignores unknown keywords fails this case.This changes the case to
"compatibility": "2020", which still covers v1.It also adds a check to
validation/check_validation_suite.pythat fails if an annotation case asserting anx-keyword annotation applies to a dialect before 2020-12. It fails on the currentunknown.jsonand passes with this change. Happy to drop it if you'd rather keep annotation checks out of that script.mainhas an older form of the same case (nocompatibilityand a 2020-12$schema). I can send a backport if that's wanted.ADR not required.