Rename contraints.oneOf to contraints.enum #191

merged 1 commit into from May 26, 2015


None yet

2 participants


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.

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

@rufuspollock rufuspollock merged commit 5e8c1cf into frictionlessdata:gh-pages May 26, 2015
@jpmckinney jpmckinney deleted the unknown repository branch Jun 11, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment