-
-
Notifications
You must be signed in to change notification settings - Fork 282
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
Gregsdennis/explicit annotations #1387
Conversation
jsonschema-core.xml
Outdated
Consequently, the "@" symbol is reserved for this purpose, and | ||
extension vocabularies which define keywords that start with "@" | ||
MUST define them as annotation-only 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 don't think we should allow vocabularies to define @
keywords. @
should explicitly mean that it's an unknown keyword. It's at best confusing to allow vocabularies to define keywords that looks exactly like non-vocabulary 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 thought it might be nice for a vocab to be able to still define a collection of related annotations. I don't think it hurts anything. It might help compatibility a well.
Think moving from random annotations to collecting them into a vocab: the schema wouldn't need to change, but you can update the metaschema.
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.
Let's move this conversation back to the discussion. It seems we have more to work out. https://github.com/orgs/json-schema-org/discussions/329#discussioncomment-5273278
I don't think there's any conflict in doing this first. It's an unnecessary feature until unknown keywords are removed, but I don't think it creates any inconsistencies.
I could take a stab at it. |
c8c669c
to
01c8327
Compare
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.
This language is good but I have a different suggestion for how to organize the sections; I'm going to propose to rewrite the "JSON Schema Objects and Keywords" section, and add requirements on how to classify keywords there.
Also as I pointed out in json-schema-org/community#356 I object to the x-
prefix because that implies something specific about who is doing the naming of the keyword, rather than the behavior of the keyword as intended. But this is a minor bikeshedding issue.
Do you have an objection to adding this now and reorganizing in another PR? Seems like rewriting entire sections is beyond the scope of this change. |
I don't think that I can rightly add the stuff about
@
keywords without first disallowing unknown keywords. But that's a big job.