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-992) Prefer numeric representation of enumeration values


     [ https://issues.oasis-open.org/browse/ODATA-992?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ralf Handl updated ODATA-992:
-----------------------------

    Proposal: 
See summary: prefer numeric representation everywhere.

Alternative: leave enumeration types as they are. If no flags or synonyms/symbolic names are required/desired, use annotation Validation.AllowedValues instead.

  was:See summary: prefer numeric representation everywhere.


> Prefer numeric representation of enumeration values
> ---------------------------------------------------
>
>                 Key: ODATA-992
>                 URL: https://issues.oasis-open.org/browse/ODATA-992
>             Project: OASIS Open Data Protocol (OData) TC
>          Issue Type: Improvement
>          Components: OData CSDL, OData CSDL JSON , OData JSON Format
>    Affects Versions: V4.0_ERRATA03
>         Environment: Proposed
>            Reporter: Ralf Handl
>             Fix For: V4.01_WD01
>
>
> Part 3: CSDL states that enumeration values are sorted and compared using their numeric value because it allows synonym symbolic names with the same numeric value.
> Part 3: CSDL also only allows symbolic values in annotations.
> JSON Format on the other hand states that the symbolic name, represented as a string, is preferred.
> This makes life unnecessarily complicated for clients to evaluate conditional annotation expressions based on enums as they can't compare enum values in annotations and payloads without internally translating them into numeric values, which they can only know after reading vocabulary files.



--
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]