Skip to content
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

atMostOneOf and noneOf applicators #9

Open
ksperling opened this issue Jun 25, 2019 · 2 comments
Open

atMostOneOf and noneOf applicators #9

ksperling opened this issue Jun 25, 2019 · 2 comments

Comments

@ksperling
Copy link

In some situations it would be useful to have an atMostOneOf applicator to express mutual exclusivity without requiring one of the alternatives to be valid. For two options this can be expressed as not allOf but for more than two it becomes difficult.

Similarly, a noneOf applicator can sometimes be useful to express a set of negative constraints (though this can be expressed with not anyOf, noneOf would read more intuitively to a human).

@handrews
Copy link
Contributor

@ksperling These sorts of keywords will be good uses of the new extensible vocabularies feature in the forthcoming draft. We are currently improving the wording around this feature based on pre-publication feedback, but otherwise the draft is about ready to go out.

We want to keep the standard keyword sets minimal, and as you note both of these concepts can be expressed with the current keywords.

However, folks who want to design and publish their own keyword sets will now be able to do so, and be able to signal to implementations that an extension is required- the idea is that implementations can offer a way to register a plugin to handle such extensions.

A convenience vocabulary for more complex logical operations would be an excellent use case for an extension vocabulary.

Otherwise, we will never get to any sort of finished RFC as there are endless reasonable possible keywords that people want.

@handrews handrews transferred this issue from json-schema-org/json-schema-org.github.io Nov 14, 2019
@philsturgeon philsturgeon transferred this issue from json-schema-org/json-schema-spec Jan 15, 2020
@gregsdennis
Copy link
Member

I've opened #43 to propose a single vocab that contains combinations of keywords like this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants