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

Rename contraints.oneOf to contraints.enum #191

merged 1 commit into from May 26, 2015


None yet
2 participants

jpmckinney commented May 5, 2015

To not create unnecessary differences between JTS and JSON Schema.

  1. If we later want something with the behavior of JSON Schema's oneOf (for example, specifying a validation for a "date" column which can either be an integer (timestamp) or a string with the format "YYYY-MM-DD"), then we'll need to find some new term instead of just using oneOf and enum in identical meanings to JSON Schema.
  2. It's almost always better to use the same terms as existing, popular prior work to avoid confusion and to avoid potential future conflicts. oneOf isn't dramatically clearer than enum. enum was chosen for JSON Schema for this second reason: ENUM is a keyword with identical behavior in SQL (and maybe even other popular prior work). Consistent terms across multiple projects is preferable to the marginal improvement in clarity.

This comment has been minimized.


rufuspollock commented May 26, 2015

Sorry for the delay in merging. Good fix and summary of agreement in #179

rufuspollock added a commit that referenced this pull request May 26, 2015

Merge pull request #191 from jpmckinney/enum
Rename contraints.oneOf to contraints.enum

@rufuspollock rufuspollock merged commit 5e8c1cf into frictionlessdata:gh-pages May 26, 2015

@jpmckinney jpmckinney deleted the jpmckinney:enum branch Jun 11, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment