Skip to content

Commit

Permalink
Explicit mention in section on actions
Browse files Browse the repository at this point in the history
  • Loading branch information
HeikoTheissen committed Jul 31, 2024
1 parent ebce37b commit f2d01a6
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 7 deletions.
3 changes: 2 additions & 1 deletion docs/odata-protocol/odata-protocol.html
Original file line number Diff line number Diff line change
Expand Up @@ -2825,6 +2825,7 @@ <h4 id="11551-invoking-an-action"><a name="InvokinganAction" href="#InvokinganAc
<span id="cb119-10"><a href="#cb119-10" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;discountCode&quot;</span><span class="fu">:</span> <span class="st">&quot;BLACKFRIDAY&quot;</span></span>
<span id="cb119-11"><a href="#cb119-11" aria-hidden="true" tabindex="-1"></a><span class="fu">}</span></span></code></pre></div>
</div>
<p>Clients MAY associate an id with individual values nested in a parameter value in the request payload by using the <a href="https://github.com/oasis-tcs/odata-vocabularies/blob/main/vocabularies/Org.OData.Core.V1.md#ContentID"><code>Core.ContentID</code></a> term defined in <a href="#ODataVocCore">OData-VocCore</a>. Services that respond with <a href="#ResponseCode200OK"><code>200 OK</code></a> SHOULD annotate corresponding entities in the response using the same <a href="https://github.com/oasis-tcs/odata-vocabularies/blob/main/vocabularies/Org.OData.Core.V1.md#ContentID"><code>Core.ContentID</code></a> value as specified in the request. See the example in <a href="#ODataJSON">OData-JSON, section 19.4</a>.</p>
</details>
<details open><summary>
<h4 id="11552-action-overload-resolution"><a name="ActionOverloadResolution" href="#ActionOverloadResolution">11.5.5.2 Action Overload Resolution</a></h4>
Expand Down Expand Up @@ -2913,7 +2914,7 @@ <h3 id="1175-referencing-the-etag-of-an-entity"><a name="ReferencingtheETagofanE
<details open><summary>
<h3 id="1176-referencing-values-from-response-bodies"><a name="ReferencingValuesfromResponseBodies" href="#ReferencingValuesfromResponseBodies">11.7.6 Referencing Values from Response Bodies</a></h3>
</summary>
<p>Services MAY support using values from a response body in the query part of the URL or in the request body of subsequent requests. A value reference can consist of a <code>$</code> character followed by the identifier of the preceding request, then the referenced value is the value represented by the response body of that preceding request. Alternatively, a value reference can consist of a <code>$</code> character followed by the value of an instance annotation with term <a href="https://github.com/oasis-tcs/odata-vocabularies/blob/main/vocabularies/Org.OData.Core.V1.md#ContentID"><code>Core.ContentID</code></a> (see <a href="#ODataVocCore">OData-VocCore</a>) that occurs in the payload of the preceding request as described in <a href="#CreateRelatedEntitiesWhenCreatinganEntity">section 11.4.2.2</a> and <a href="#UpdateRelatedEntitiesWhenUpdatinganEntity">section 11.4.3.1</a> or in a preceding action payload as in the example in <a href="#ODataJSON">OData-JSON, section 19.4</a>, then the referenced value is the corresponding value in the response, which the service SHOULD annotate with the same <code>Core.ContentID</code> value.</p>
<p>Services MAY support using values from a response body in the query part of the URL or in the request body of subsequent requests. A value reference can consist of a <code>$</code> character followed by the identifier of the preceding request, then the referenced value is the value represented by the response body of that preceding request. Alternatively, a value reference can consist of a <code>$</code> character followed by the value of an instance annotation with term <a href="https://github.com/oasis-tcs/odata-vocabularies/blob/main/vocabularies/Org.OData.Core.V1.md#ContentID"><code>Core.ContentID</code></a> (see <a href="#ODataVocCore">OData-VocCore</a>) that occurs in the payload of the preceding request as described in <a href="#CreateRelatedEntitiesWhenCreatinganEntity">section 11.4.2.2</a>, <a href="#UpdateRelatedEntitiesWhenUpdatinganEntity">section 11.4.3.1</a>, and <a href="#InvokinganAction">section 11.5.5.1</a>, then the referenced value is the corresponding value in the response, which the service SHOULD annotate with the same <code>Core.ContentID</code> value.</p>
<p>In both cases, if the referenced value is a collection, the value reference MAY be followed by a <code>collectionNavigationExpr</code>, as defined in <a href="#ODataABNF">OData-ABNF</a>, that is evaluated relative to the referenced value. Otherwise the value reference MAY be followed by a forward slash and a <code>memberExpr</code> that is evaluated relative to the referenced value.</p>
<p>If the <code>$</code>-prefixed identifier is identical to the name of a predefined literal for query expressions (<code>$it</code>, <code>$root</code>, or other literals defined according to the <a href="#HeaderODataVersion"><code>OData-Version</code></a> of the protocol specified in the request), then the predefined literal is used. This collision can be avoided by e.g. using only numeric identifiers.</p>
</details>
Expand Down
15 changes: 12 additions & 3 deletions docs/odata-protocol/odata-protocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -5634,6 +5634,15 @@ Content-Type: application/json
```
:::

Clients MAY associate an id with individual values nested in a parameter value in
the request payload by using the
[`Core.ContentID`](https://github.com/oasis-tcs/odata-vocabularies/blob/main/vocabularies/Org.OData.Core.V1.md#ContentID)
term defined in [OData-VocCore](#ODataVocCore).
Services that respond with [`200 OK`](#ResponseCode200OK) SHOULD annotate corresponding
entities in the response using the same
[`Core.ContentID`](https://github.com/oasis-tcs/odata-vocabularies/blob/main/vocabularies/Org.OData.Core.V1.md#ContentID)
value as specified in the request. See the example in [OData-JSON, section 19.4](#ODataJSON).

#### <a name="ActionOverloadResolution" href="#ActionOverloadResolution">11.5.5.2 Action Overload Resolution</a>

The same action name may be used multiple times within a schema provided
Expand Down Expand Up @@ -5872,9 +5881,9 @@ represented by the response body of that preceding request. Alternatively, a val
reference can consist of a `$` character followed by the value of an instance annotation with term
[`Core.ContentID`](https://github.com/oasis-tcs/odata-vocabularies/blob/main/vocabularies/Org.OData.Core.V1.md#ContentID)
(see [OData-VocCore](#ODataVocCore)) that occurs in the payload of the preceding request
as described in [section 11.4.2.2](#CreateRelatedEntitiesWhenCreatinganEntity) and
[section 11.4.3.1](#UpdateRelatedEntitiesWhenUpdatinganEntity) or in a preceding action payload
as in the example in [OData-JSON, section 19.4](#ODataJSON),
as described in [section 11.4.2.2](#CreateRelatedEntitiesWhenCreatinganEntity),
[section 11.4.3.1](#UpdateRelatedEntitiesWhenUpdatinganEntity), and
[section 11.5.5.1](#InvokinganAction),
then the referenced value is the corresponding value in the response,
which the service SHOULD annotate with the same `Core.ContentID` value.

Expand Down
9 changes: 9 additions & 0 deletions odata-protocol/11.5 Operations.md
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,15 @@ Content-Type: application/json
```
:::

Clients MAY associate an id with individual values nested in a parameter value in
the request payload by using the
[`Core.ContentID`](https://github.com/oasis-tcs/odata-vocabularies/blob/main/vocabularies/Org.OData.Core.V1.md#ContentID)
term defined in [OData-VocCore](#ODataVocCore).
Services that respond with [`200 OK`](#ResponseCode200OK) SHOULD annotate corresponding
entities in the response using the same
[`Core.ContentID`](https://github.com/oasis-tcs/odata-vocabularies/blob/main/vocabularies/Org.OData.Core.V1.md#ContentID)
value as specified in the request. See the example in [OData-JSON, section 19.4](#ODataJSON).

#### ##subsubsubsec Action Overload Resolution

The same action name may be used multiple times within a schema provided
Expand Down
6 changes: 3 additions & 3 deletions odata-protocol/11.7 Batch Requests.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,9 @@ represented by the response body of that preceding request. Alternatively, a val
reference can consist of a `$` character followed by the value of an instance annotation with term
[`Core.ContentID`](https://github.com/oasis-tcs/odata-vocabularies/blob/main/vocabularies/Org.OData.Core.V1.md#ContentID)
(see [OData-VocCore](#ODataVocCore)) that occurs in the payload of the preceding request
as described in [section ##CreateRelatedEntitiesWhenCreatinganEntity] and
[section ##UpdateRelatedEntitiesWhenUpdatinganEntity] or in a preceding action payload
as in the example in [OData-JSON, section 19.4](#ODataJSON),
as described in [section ##CreateRelatedEntitiesWhenCreatinganEntity],
[section ##UpdateRelatedEntitiesWhenUpdatinganEntity], and
[section ##InvokinganAction],
then the referenced value is the corresponding value in the response,
which the service SHOULD annotate with the same `Core.ContentID` value.

Expand Down

0 comments on commit f2d01a6

Please sign in to comment.