Skip to content

Commit 0c8c8d8

Browse files
committed
SAP-specific solution to oasis-tcs/odata-specs#2067
1 parent 68fc372 commit 0c8c8d8

File tree

3 files changed

+24
-0
lines changed

3 files changed

+24
-0
lines changed

Diff for: vocabularies/Common.json

+8
Original file line numberDiff line numberDiff line change
@@ -1358,6 +1358,14 @@
13581358
"$AppliesTo": ["EntityContainer"],
13591359
"@Core.Description": "Service prefers requests to use a resource path with navigation properties",
13601360
"@Core.LongDescription": "Use this tag on services that do not restrict requests to certain resource paths\nvia [`Capabilities`](https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Capabilities.V1.html)\nor [`Core.RequiresExplicitBinding`](https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Core.V1.html#RequiresExplicitBinding)\nannotations, but that prefer requests with a resource path that\ncontains the navigation properties reflecting the UI structure.\n\nFor example, entering a cancellation fee into an order item field bound to `CancellationItem/Fee`\nleads to a\n`PATCH Orders(23)/Items(5)/CancellationItem` request with `{\"Fee\": ...}` payload."
1361+
},
1362+
"PartnerPath": {
1363+
"$Kind": "Term",
1364+
"$Type": "Edm.NavigationPropertyPath",
1365+
"$AppliesTo": ["NavigationProperty"],
1366+
"@Common.Experimental": true,
1367+
"@Core.Description": "A navigation property path that behaves like a [partner navigation property](https://oasis-tcs.github.io/odata-specs/odata-csdl-xml/odata-csdl-xml.html#PartnerNavigationProperty) but may traverse other navigation properties",
1368+
"@Core.LongDescription": "Let B be any entity in the collection addressed by evaluating the `PartnerPath` starting at an entity A.\nIf the annotated navigation property is single-valued, it MUST lead back from B to A.\nIf the annotated navigation property is collection-valued, A MUST be one of the\nentities related to B via it.\n\nExample: `Headers(1)/_Item(2)/_Subitem(3)/_Header` is the same entity as `Headers(1)`\nif the subitems entity type has a non-containment navigation property `_Header` annotated with\n`\"@Common.PartnerPath\": \"_Item/_Subitem\"`."
13611369
}
13621370
}
13631371
}

Diff for: vocabularies/Common.md

+1
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ Term|Type|Description
114114
[WebSocketBaseURL](Common.xml#L1506) *([Experimental](Common.md#Experimental))*|URL|<a name="WebSocketBaseURL"></a>Base URL for WebSocket connections<br>This annotation MUST be unqualified.
115115
[WebSocketChannel](Common.xml#L1514) *([Experimental](Common.md#Experimental))*|String?|<a name="WebSocketChannel"></a>Channel for WebSocket connections<br><p>Messages sent over the channel follow the <a href="https://community.sap.com/t5/application-development-blog-posts/specification-of-the-push-channel-protocol-pcp/ba-p/13137541">ABAP Push Channel Protocol</a>. To consume a channel, the client opens a web socket connection at the <a href="#WebSocketBaseURL"><code>WebSocketBaseURL</code></a> followed by URL parameters</p> <ul> <li>parameter name = annotation qualifier, parameter value = channel ID (see below)</li> <li>parameter name = <code>relatedService</code>, parameter value = base URL (relative to server root) of the OData service of the app</li> </ul> <p>Supported qualifiers and channel IDs:</p> <dl> <dt>`sideEffects` <dd>Notifications about side effects to be triggered by the client (channel ID = non-null annotation value) </dl>
116116
[AddressViaNavigationPath](Common.xml#L1531)|[Tag](https://github.com/oasis-tcs/odata-vocabularies/blob/main/vocabularies/Org.OData.Core.V1.md#Tag)|<a name="AddressViaNavigationPath"></a>Service prefers requests to use a resource path with navigation properties<br>Use this tag on services that do not restrict requests to certain resource paths via [`Capabilities`](https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Capabilities.V1.html) or [`Core.RequiresExplicitBinding`](https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Core.V1.html#RequiresExplicitBinding) annotations, but that prefer requests with a resource path that contains the navigation properties reflecting the UI structure.<br>For example, entering a cancellation fee into an order item field bound to `CancellationItem/Fee` leads to a `PATCH Orders(23)/Items(5)/CancellationItem` request with `{"Fee": ...}` payload.
117+
[PartnerPath](Common.xml#L1546) *([Experimental](Common.md#Experimental))*|NavigationPropertyPath|<a name="PartnerPath"></a>A navigation property path that behaves like a [partner navigation property](https://oasis-tcs.github.io/odata-specs/odata-csdl-xml/odata-csdl-xml.html#PartnerNavigationProperty) but may traverse other navigation properties<br>Let B be any entity in the collection addressed by evaluating the `PartnerPath` starting at an entity A. If the annotated navigation property is single-valued, it MUST lead back from B to A. If the annotated navigation property is collection-valued, A MUST be one of the entities related to B via it.<br>Example: `Headers(1)/_Item(2)/_Subitem(3)/_Header` is the same entity as `Headers(1)` if the subitems entity type has a non-containment navigation property `_Header` annotated with `"@Common.PartnerPath": "_Item/_Subitem"`.
117118

118119
<a name="TextFormatType"></a>
119120
## [TextFormatType](Common.xml#L134)

Diff for: vocabularies/Common.xml

+15
Original file line numberDiff line numberDiff line change
@@ -1543,6 +1543,21 @@ leads to a
15431543
</Annotation>
15441544
</Term>
15451545

1546+
<Term Name="PartnerPath" Type="Edm.NavigationPropertyPath" Nullable="false" AppliesTo="NavigationProperty">
1547+
<Annotation Term="Common.Experimental" />
1548+
<Annotation Term="Core.Description" String="A navigation property path that behaves like a [partner navigation property](https://oasis-tcs.github.io/odata-specs/odata-csdl-xml/odata-csdl-xml.html#PartnerNavigationProperty) but may traverse other navigation properties" />
1549+
<Annotation Term="Core.LongDescription">
1550+
<String>Let B be any entity in the collection addressed by evaluating the `PartnerPath` starting at an entity A.
1551+
If the annotated navigation property is single-valued, it MUST lead back from B to A.
1552+
If the annotated navigation property is collection-valued, A MUST be one of the
1553+
entities related to B via it.
1554+
1555+
Example: `Headers(1)/_Item(2)/_Subitem(3)/_Header` is the same entity as `Headers(1)`
1556+
if the subitems entity type has a non-containment navigation property `_Header` annotated with
1557+
`"@Common.PartnerPath": "_Item/_Subitem"`.</String>
1558+
</Annotation>
1559+
</Term>
1560+
15461561
</Schema>
15471562
</edmx:DataServices>
15481563
</edmx:Edmx>

0 commit comments

Comments
 (0)