OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

odata message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: [OASIS Issue Tracker] (ODATA-1170) Allow @odata.type next to $EnumMember for isomorphy to CSDL XML


Ralf Handl created ODATA-1170:
---------------------------------

             Summary: Allow @odata.type next to $EnumMember for isomorphy to CSDL XML
                 Key: ODATA-1170
                 URL: https://issues.oasis-open.org/browse/ODATA-1170
             Project: OASIS Open Data Protocol (OData) TC
          Issue Type: Improvement
          Components: CSDL JSON , CSDL XML
    Affects Versions: V4.01_CS01
         Environment: Proposed
            Reporter: Ralf Handl
             Fix For: V4.01_CS02


The XML representation of <EnumMember> constant expressions contains the enumeration type name of the enumeration value as a prefix:

<Annotation Term="Namespace1_Alias.TermEnum">
  <EnumMember>
     Namespace1_Alias.ENString/String1 Namespace1_Alias.ENString/String3
 </EnumMember>
</Annotation>

The JSON representation does not contain the type name:

"@com.odata.v4.technical.scenario.TermEnum":
{
   "$EnumMember": "String1,String3"
}

This breaks isomorphy between XML and JSON representation of CSDL.

The JSON representation was explicitly chosen without type prefix to mirror the JSON Format representation of enumeration values in data payloads. 

Allowing an @odata.type control information next to $EnumMember would both be consistent with JSON Format and establish isomorphy to CSDL XML:

"@com.odata.v4.technical.scenario.TermEnum":
{
   "@odata.type": "Namespace1_Alias.ENString",
   "$EnumMember": "String1,String3"
}





--
This message was sent by Atlassian JIRA
(v6.2.2#6258)


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]