-
Type: Improvement
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: V4.01_CS01
-
Fix Version/s: V4.01_CS02
-
Component/s: CSDL JSON
-
Labels:None
-
Environment:
Applied
-
Proposal:
-
Resolution:
In ODATA-1170 we added the ability to add the type to a term of an enum type.
The solution chosen was to annotate the predefined, one and only, $EnumMember property, which, by itself, does not add anything other then telling the consumer that he/she is dealing with the name of a member of an enum type, still requiring the $metadata document to find out what the actual enum type is.
That raises the question why one needs that object wrapper to begin with and why we, like with regular enum typed structured properties, don't simply use the same format and return the enum members name as a string value of that term.
And if we do so for enum types why wouldn't we do that for all primitive types for which we introduced a similar wrapper object with one predefined $-property?
Side question: Does our XML to JSON CSDL conversion correctly convert our annotations to begin with? I'd be tempted to say that enum properties IN complex types used in terms should use the standard JSON format and not the object wrapper with the $EnumMember property either not?