Uploaded image for project: 'OASIS Open Data Protocol (OData) TC'
  1. OASIS Open Data Protocol (OData) TC
  2. ODATA-231

Define how to specify enumeration values in annotations

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: V4.0_WD01
    • Fix Version/s: V4.0_WD01
    • Component/s: CSDL XML
    • Labels:
      None
    • Environment:

      [Proposed]

      Description

      When we fleshed out semantics/syntax/etc. around Enumerations we neglected to define how to reference Enum values in Annotations.

        Attachments

          Activity

          mikep Michael Pizzo (Inactive) created issue -
          ralfhandl Ralf Handl made changes -
          Field Original Value New Value
          Component/s OData CSDL v1.0 [ 10268 ]
          Fix Version/s WD01 [ 10247 ]
          Affects Version/s WD01 [ 10247 ]
          ralfhandl Ralf Handl made changes -
          Proposal Add EnumMember attribute to <PropertyValue> element for attribute notation and <EnumMember> element as child to <PropertyValue> for element notation. Add EnumMember attribute to <PropertyValue> element for attribute notation and <EnumMember> element as child to <PropertyValue> for element notation.

          Accepted: https://www.oasis-open.org/committees/download.php/48097/odata-meeting-23_on-20130130_31-F2F-minutes.html#odata-231
          Status New [ 10000 ] Open [ 1 ]
          ralfhandl Ralf Handl made changes -
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Resolved [ 5 ]
          ralfhandl Ralf Handl made changes -
          Assignee Ralf Handl [ ralfhandl ]
          Hide
          ralfhandl Ralf Handl added a comment -

          Required a SimpleIdentifier for the expression value:

          <Annotation Term="org.example.Color" EnumMember="Yellow" />

          <Annotation Term="org.example.Color">
          <EnumMember>Yellow</EnumMember>
          </Annotation>

          An alternative would have been to allow (or even require) a Qualified name:

          <Annotation Term="org.example.Color" EnumMember="org.example.ColorType.Yellow" />

          <Annotation Term="org.example.Color">
          <EnumMember>org.example.ColorType.Yellow</EnumMember>
          </Annotation>

          But I assume that real cases are rare when the EnumType definition is known and the Term definition using that EnumType definition is not.

          Show
          ralfhandl Ralf Handl added a comment - Required a SimpleIdentifier for the expression value: <Annotation Term="org.example.Color" EnumMember="Yellow" /> <Annotation Term="org.example.Color"> <EnumMember>Yellow</EnumMember> </Annotation> An alternative would have been to allow (or even require) a Qualified name: <Annotation Term="org.example.Color" EnumMember="org.example.ColorType.Yellow" /> <Annotation Term="org.example.Color"> <EnumMember>org.example.ColorType.Yellow</EnumMember> </Annotation> But I assume that real cases are rare when the EnumType definition is known and the Term definition using that EnumType definition is not.
          handl Ralf Handl made changes -
          Assignee Ralf Handl [ ralfhandl ] Ralf Handl [ handl ]

            People

            • Assignee:
              handl Ralf Handl
              Reporter:
              mikep Michael Pizzo (Inactive)
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: