-
-
Notifications
You must be signed in to change notification settings - Fork 308
Ignore unknown keywords or treat as annotations #1269
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
When we added the "SHOULD collect as annotations" behavior for unknown keywords, we forgot to retain the MUST directive to ignore them if the SHOULD is not followed. Which also ensures that no other behavior than collecting as a annotations is performed. This also consolidates the behavioral specification in one place as it appeared in two places before.
Co-authored-by: Jason Desrosiers <[email protected]>
A JSON Schema MAY contain properties which are not schema keywords. | ||
Unknown keywords SHOULD be treated as annotations, where the value | ||
of the keyword is the value of the annotation. | ||
A JSON Schema MAY contain properties which are not schema keywords or are not recognized as schema keywords. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it'd suffice to say "A JSON Schema MAY contain properties which are not recognized as schema keywords."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, I see this was the subject of the resolved review. no need to relitigate that if it's been sufficiently addressed, disregard if so.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@notEthan I preserved the "not schema keywords" part from the original text because I don't remember why it was phrased that way and did not want to get into a debate about whether it is OK to remove it. If you think it should be removed, we should probably discuss that in an issue. I figured adding "or are not recognized as..." would cover the more common way this is thought about without removing anything previously allowed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sounds good to me
This is just a bug fix for an accidental oversight. I'm hoping it's non-controversial as I don't think any of us meant to allow arbitrary behaviors for unrecognized keywords.
When we added the "SHOULD collect as annotations" behavior for
unknown keywords, we forgot to retain the MUST directive to ignore
them if the SHOULD is not followed. Which also ensures that
no other behavior than collecting as a annotations is performed.
This also consolidates the behavioral specification in one place
as it appeared in two places before.