-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: V4.0_ERRATA03
-
Fix Version/s: V4.01_WD01
-
Component/s: Vocabularies
-
Labels:None
-
Environment:
[Proposed]
-
Proposal:
-
Resolution:
ODATA-849 proposes allowing enumerations to extend other enumerations.
ODATA-494 similarly proposes allowing enumerations to derive from other enumerations.
ODATA-874 proposes allowing string as an underlying type
We have also had requests to support enumerations that don't conform to the rules for simple identifiers (i.e., they may have spaces, dashes, etc. in the names)
All of these are good suggestions, but they don't play well with enumerations in programming languages.
As an alternative to trying to introduce rules that don't work well with programming languages, we could simply extend the validation vocabulary with a term that could be applied to any property in order to limit the domain of valid values for that property, or defined as a type definition such that any property that used that type definition would have the constraint.
The semantics of this new construct would be clear up front that it could change over time, so applications would need to account for unexpected values.
This could be used where an enumeration was not appropriate, for example:
1) Where the allowable values needed to change over time
2) Where the allowable values needed to extend an existing allowable values
3) Where the allowable values were not (all) strings
4) Where the allowable values did not satisfy simple identifier rules