-
Type: Improvement
-
Status: New
-
Priority: Major
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: Vocabularies
-
Labels:None
In the current state, ExpandRestrictions can specify the forbidden nested expansions via the NonExpandableProperties but can't specify the other nested query options.
For example the request GET /orders/?$expand=items($expand=sku) is allowed with Capabilities annotation that allows expansion for the paths ["items", "items/sku"]. But the capabilities a) needs to list the NonExpandableProperties b) has no way to specify if there is a filter restriction allowed inside of the expanded items ( GET /orders/?$expand=items($expand=sku; $filter=count gt 10) )
This is different for other restrictions that typically are used as part of a NavigationPropertyRestriction that lists the NavigationProperty Path together with all kinds of restrictions.
Hypothetical
<Annotations Target="example.com.Service/orders"> <Annotation Term="Org.OData.Capabilities.V1.NavigationRestrictions"> <Record Type="Org.OData.Capabilities.V1.NavigationRestrictionsType"> <PropertyValue Property="RestrictedProperties"> <Collection> <Record Type="Org.OData.Capabilities.V1.NavigationPropertyRestriction"> <PropertyValue Property="NavigationProperty" NavigationPropertyPath="items" /> <PropertyValue Property="ExpandRestrictions"> <Record Type="Org.OData.Capabilities.V1.ExpandRestrictionsType"> </Record> </PropertyValue> </Record> <Record Type="Org.OData.Capabilities.V1.NavigationPropertyRestriction"> <PropertyValue Property="NavigationProperty" NavigationPropertyPath="items/sku" /> <PropertyValue Property="ExpandRestrictions"> <Record Type="Org.OData.Capabilities.V1.ExpandRestrictionsType"> </Record> </PropertyValue> </Record> </Collection> </PropertyValue> </Record> </Annotation> </Annotations>
But that doesn't quite capture the situation since the ExpandRestriction is not restricting the navigation property it is "applied to" (items and items/sku) in the above but rather is restricting the navigation properties of the structured type of structured type it is applied to (hence the NonExpandableProperties)