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-929) Nullable facet should default to false for collection types, rather than being unspecified


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

Michael Pizzo updated ODATA-929:
--------------------------------

    Proposal: New proposal from meeting: To be compliant, 4.01 Services MUST specify Nullable for collections.  Since this is a new 4.01 requirement, clients SHOULD be prepared for collections that do not specify the value.  (was: For OData CSDL 4.01, explicitly list "false" as the default value of the Nullable facet for collection-valued types (wherever that facets is usable, e.g. Property, Term, ReturnType...).
)

> Nullable facet should default to false for collection types, rather than being unspecified
> ------------------------------------------------------------------------------------------
>
>                 Key: ODATA-929
>                 URL: https://issues.oasis-open.org/browse/ODATA-929
>             Project: OASIS Open Data Protocol (OData) TC
>          Issue Type: Improvement
>          Components: OData CSDL
>    Affects Versions: V4.01_WD01
>            Reporter: Evan Ireland
>             Fix For: V4.01_WD01
>
>
> For the Nullable facet, CSDL errata03 states:
> * If no value is specified for a property whose Type attribute specifies a collection, the client cannot assume any default value.
> * The absence of the Nullable attribute means it is unknown whether the collection can contain null values.
> However evidence from common examples shows that schema authors commonly omit the Nullable facet for collection-valued properties, when they intend/assume that Nullable defaults to false. Also, since it is quite unusual to permit nullable items in a list, if the default Nullable facet for collections were "true", it would result in unnecessary extra work for schema authors.
> It is undesirable for it to be so easy for schema authors to accidentally permit this important facet to have an undefined value.
> Evidence (from errata02 standard vocabularies) has 16 properties and 4 terms with no Nullable facet. However it would appear that none of these intended to allow nullable collection items.
> Searching for: Type="Collection(
> v4_0.errata02.Org.OData.Capabilities.V1.xml(128): <Term Name="SupportedFormats" Type="Collection(Edm.String)">
> v4_0.errata02.Org.OData.Capabilities.V1.xml(133): <Term Name="AcceptableEncodings" Type="Collection(Edm.String)" AppliesTo="EntityContainer">
> v4_0.errata02.Org.OData.Capabilities.V1.xml(161): <Property Name="CallbackProtocols" Type="Collection(Capabilities.CallbackProtocol)" />
> v4_0.errata02.Org.OData.Capabilities.V1.xml(186): <Property Name="FilterableProperties" Type="Collection(Edm.PropertyPath)">
> v4_0.errata02.Org.OData.Capabilities.V1.xml(189): <Property Name="ExpandableProperties" Type="Collection(Edm.NavigationPropertyPath)">
> v4_0.errata02.Org.OData.Capabilities.V1.xml(203): <Property Name="NonCountableProperties" Type="Collection(Edm.PropertyPath)">
> v4_0.errata02.Org.OData.Capabilities.V1.xml(206): <Property Name="NonCountableNavigationProperties" Type="Collection(Edm.NavigationPropertyPath)">
> v4_0.errata02.Org.OData.Capabilities.V1.xml(218): <Property Name="RestrictedProperties" Type="Collection(Capabilities.NavigationPropertyRestriction)" />
> v4_0.errata02.Org.OData.Capabilities.V1.xml(255): <Term Name="FilterFunctions" Type="Collection(Edm.String)" AppliesTo="EntityContainer EntitySet">
> v4_0.errata02.Org.OData.Capabilities.V1.xml(269): <Property Name="RequiredProperties" Type="Collection(Edm.PropertyPath)">
> v4_0.errata02.Org.OData.Capabilities.V1.xml(273): <Property Name="NonFilterableProperties" Type="Collection(Edm.PropertyPath)">
> v4_0.errata02.Org.OData.Capabilities.V1.xml(285): <Property Name="AscendingOnlyProperties" Type="Collection(Edm.PropertyPath)">
> v4_0.errata02.Org.OData.Capabilities.V1.xml(288): <Property Name="DescendingOnlyProperties" Type="Collection(Edm.PropertyPath)">
> v4_0.errata02.Org.OData.Capabilities.V1.xml(291): <Property Name="NonSortableProperties" Type="Collection(Edm.PropertyPath)">
> v4_0.errata02.Org.OData.Capabilities.V1.xml(303): <Property Name="NonExpandableProperties" Type="Collection(Edm.NavigationPropertyPath)">
> v4_0.errata02.Org.OData.Capabilities.V1.xml(337): <Property Name="NonInsertableNavigationProperties" Type="Collection(Edm.NavigationPropertyPath)">
> v4_0.errata02.Org.OData.Capabilities.V1.xml(349): <Property Name="NonUpdatableNavigationProperties" Type="Collection(Edm.NavigationPropertyPath)">
> v4_0.errata02.Org.OData.Capabilities.V1.xml(361): <Property Name="NonDeletableNavigationProperties" Type="Collection(Edm.NavigationPropertyPath)">
> v4_0.errata02.Org.OData.Core.V1.xml(145): <Term Name="AcceptableMediaTypes" Type="Collection(Edm.String)" AppliesTo="EntityType Property">
> v4_0.errata02.Org.OData.Core.V1.xml(161): <Term Name="OptimisticConcurrency" Type="Collection(Edm.PropertyPath)" AppliesTo="EntitySet">
> Found 20 occurrence(s) in 2 file(s)
> Evidence from Microsoft TripPin sample: 3 collection-valued properties (2 of which are missing the Nullable facet)
> C:\projects\xscript\src\test\xs\data\Microsoft.OData.SampleService.Models.TripPin.xml(61): <Property Name="Emails" Type="Collection(Edm.String)"/>
> C:\projects\xscript\src\test\xs\data\Microsoft.OData.SampleService.Models.TripPin.xml(62): <Property Name="AddressInfo" Type="Collection(Microsoft.OData.SampleService.Models.TripPin.Location)"/>
> C:\projects\xscript\src\test\xs\data\Microsoft.OData.SampleService.Models.TripPin.xml(142): <Property Name="Tags" Type="Collection(Edm.String)" Nullable="false"/>



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