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

          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.

            People

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

              Dates

              • Created:
                Updated:
                Resolved: