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

Navigable capability term should apply to entityset, not navigationproperty directly

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: V4.0_CS01
    • Fix Version/s: V4.0_CSD03
    • Component/s: Vocabularies
    • Labels:
      None
    • Environment:

      [Applied]

    • Proposal:
      Hide

      Replace the "Navigable" term in the Capabilities vocabulary with a "NavigationRestrictions" term that can be applied to the entity set:

      <!-NavigationRestrictions->

      <Term Name="NavigationRestrictions" Type="Capabilities.NavigationRestrictionsType" AppliesTo="EntitySet">
      <Annotation Term="Core.Description" String="Restrictions on navigating properties according to OData URL conventions" />
      </Term>
      <ComplexType Name="NavigationRestrictionsType">
      <Property Name="Navigability" Type="Capabilities.NavigationType" >
      <Annotation Term="Core.Description" String="Supported Navigability"/>
      </Property>
      <Property Name="RestrictedProperties" Type="Collection(Capabilities.NavigationPropertyRestriction)"/>
      </ComplexType>

      <ComplexType Name="NavigationPropertyRestriction">
      <Property Name="NavigationProperty" Type="Edm.NavigationPropertyPath">
      <Annotation Term="Core.Description" String="Navigation properties can be navigated to a single level" />
      </Property>
      <Property Name="Navigability" Type="Capabilities.NavigationType">
      <Annotation Term="Core.Description" String="Navigation properties can be navigated to a single level" />
      </Property>
      </ComplexType>

      <EnumType Name="NavigationType">
      <Member Name="Recursive">
      <Annotation Term="Core.Description" String="Navigation properties can be recursively navigated" />
      </Member>
      <Member Name="Single">
      <Annotation Term="Core.Description" String="Navigation properties can be navigated to a single level" />
      </Member>
      <Member Name="None">
      <Annotation Term="Core.Description" String="Navigation properties are not navigable" />
      </Member>
      </EnumType>

      Show
      Replace the "Navigable" term in the Capabilities vocabulary with a "NavigationRestrictions" term that can be applied to the entity set: <!- NavigationRestrictions -> <Term Name="NavigationRestrictions" Type="Capabilities.NavigationRestrictionsType" AppliesTo="EntitySet"> <Annotation Term="Core.Description" String="Restrictions on navigating properties according to OData URL conventions" /> </Term> <ComplexType Name="NavigationRestrictionsType"> <Property Name="Navigability" Type="Capabilities.NavigationType" > <Annotation Term="Core.Description" String="Supported Navigability"/> </Property> <Property Name="RestrictedProperties" Type="Collection(Capabilities.NavigationPropertyRestriction)"/> </ComplexType> <ComplexType Name="NavigationPropertyRestriction"> <Property Name="NavigationProperty" Type="Edm.NavigationPropertyPath"> <Annotation Term="Core.Description" String="Navigation properties can be navigated to a single level" /> </Property> <Property Name="Navigability" Type="Capabilities.NavigationType"> <Annotation Term="Core.Description" String="Navigation properties can be navigated to a single level" /> </Property> </ComplexType> <EnumType Name="NavigationType"> <Member Name="Recursive"> <Annotation Term="Core.Description" String="Navigation properties can be recursively navigated" /> </Member> <Member Name="Single"> <Annotation Term="Core.Description" String="Navigation properties can be navigated to a single level" /> </Member> <Member Name="None"> <Annotation Term="Core.Description" String="Navigation properties are not navigable" /> </Member> </EnumType>
    • Resolution:
      Show
      https://tools.oasis-open.org/version-control/browse/wsvn/odata/trunk/spec/vocabularies/Org.OData.Capabilities.V1.xml?rev=478 Applied: https://www.oasis-open.org/committees/download.php/50877/odata-meeting-54_on-20131001-minutes.html#ga_01

      Description

      We decided to define all capabilities on either the entity set or the entity container, rather than type, so that we could share a type definitions across sets, and even services, and define the relative restrictions based on the actual exposed set.

      Somehow we missed the navigable term in doing this, the current definition of which is:

      <Term Name="Navigable" Type="Core.Tag" DefaultValue="true" AppliesTo="NavigationProperty">
      <Annotation Term="Core.Description" String="Supports navigation paths according to OData URL conventions" />
      </Term>

      Also, note that many service support one level of navigation but not recursive navigation. We should capture that as well.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: