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-494) Add possibility to "extend" enumeration types with additional values

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

Ralf Handl updated ODATA-494:

    Environment: Proposed
Allow EnumType to specify a BaseType to which the EnumType will add new members. BaseType and UnderlyingType cannot be both specified, the UnderlyingType.

In metadata annotations the EnumMember syntax requires prefixing the member name with the fully qualified type name in all cases, so there's no ambiguity if the same base enum type is extended by more than one other enum type.

For properties and instance annotations in request and response bodies enum members are represented only as the member name without the type name prefix if the member is defined by the declared type of the property. Members of a derived type must be prefixed with the qualified type name. This is consistent with the metadata annotation syntax and the URL syntax for accessing properties of derived types:


> Add possibility to "extend" enumeration types with additional values
> --------------------------------------------------------------------
>                 Key: ODATA-494
>                 URL: https://issues.oasis-open.org/browse/ODATA-494
>             Project: OASIS Open Data Protocol (OData) TC
>          Issue Type: Improvement
>          Components: OData CSDL
>    Affects Versions: V4.0_CS01
>         Environment: Proposed
>            Reporter: Ralf Handl
>            Assignee: Ralf Handl
>              Labels: GoodIdea
>             Fix For: V4.01_WD01
> We currently don't have a way for adding values to an enumeration type. This would be helpful for defining custom vocabularies that extend base vocabularies. 
> It's sort of inheritance for enumerations, given the fact that some programming languages implement enumerations as classes/objects with members/properties for the enumeration values. 
> So we could add an attribute "BaseType" or "Extends" for EnumType to add new enumeration values.

This message was sent by Atlassian JIRA

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