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
Proposal: constraints.oneOf #179
Proposal: constraints.oneOf #179
Conversation
[jts]: Add constraints.oneOf - fixes #175.
Is it too late to rename to |
Hi @jpmckinney. As I said in original issue for this, I'm easy. Anyone else want to +1 for using |
Here's a thought that may be a +1 for Does it make sense to "overload" the oneOf/enum constraint to mean the former rather than the latter when type == 'array'? If so, I think calling this constraint |
One additional note... At first I thought overloading So overloading |
Overloading is confusing. JSON Schema would do it like this:
The With the above schema (you can test at https://json-schema-validator.herokuapp.com/), |
Thanks @jpmckinney, makes perfect sense. Do you think it's worth adding this to JTS as well? |
I suppose, if it's anticipated that people will be using a lot of JSON arrays within CSVs. I don't know that the use case is very well developed, though. |
@jpmckinney @dandelany The above examples with arrays are interesting, but I think getting out of scope as comments on this pull request that was already merged. Perhaps you want to reopen the original oneOf/enum issue. As for what was already merged: @rgrp @paulfitz what do you think about @jpmckinney's suggestion of preferring
|
My response to the original reasoning is (1) if we later want something with the behavior of JSON Schema's |
@jpmckinney @dandelany perhaps you want to open a new issue (more visibility) to raise the points above? Otherwise, time goes on and people will start implementing |
See #191 |
As per #175