Skip to content

Commit

Permalink
Merge branch 'ODATA-1636' of [email protected]:oasis-tcs/odata-specs.git…
Browse files Browse the repository at this point in the history
… into ODATA-1636
  • Loading branch information
HeikoTheissen committed Jan 31, 2024
2 parents dd20e12 + 853e436 commit 9c74f5a
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 22 deletions.
15 changes: 6 additions & 9 deletions docs/odata-json-format/odata-json-format.html
Original file line number Diff line number Diff line change
Expand Up @@ -1810,7 +1810,7 @@ <h2 id="193-referencing-an-etag"><a name="ReferencinganETag" href="#Referencinga
</div>
<h2 id="194-referencing-response-body-values"><a name="ReferencingResponseBodyValues" href="#ReferencingResponseBodyValues">19.4 Referencing Response Body Values</a></h2>
<div class="example">
<p>Example 51: a batch request that contains the following operations in the order listed: the order listed:</p>
<p>Example 51: a batch request that contains the following operations in the order listed:</p>
<ul>
<li>Get an employee (with <code>Content-ID = 1</code>)</li>
<li>Get all employees residing in the same building</li>
Expand All @@ -1834,17 +1834,14 @@ <h2 id="194-referencing-response-body-values"><a name="ReferencingResponseBodyVa
<span id="cb58-17"><a href="#cb58-17" aria-hidden="true" tabindex="-1"></a> <span class="fu">{</span></span>
<span id="cb58-18"><a href="#cb58-18" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;id&quot;</span><span class="fu">:</span> <span class="st">&quot;2&quot;</span><span class="fu">,</span></span>
<span id="cb58-19"><a href="#cb58-19" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;dependsOn&quot;</span><span class="fu">:</span> <span class="ot">[</span> <span class="st">&quot;1&quot;</span> <span class="ot">]</span><span class="fu">,</span></span>
<span id="cb58-20"><a href="#cb58-20" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;method&quot;</span><span class="fu">:</span> <span class="st">&quot;patch&quot;</span><span class="fu">,</span></span>
<span id="cb58-20"><a href="#cb58-20" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;method&quot;</span><span class="fu">:</span> <span class="st">&quot;get&quot;</span><span class="fu">,</span></span>
<span id="cb58-21"><a href="#cb58-21" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;url&quot;</span><span class="fu">:</span> <span class="st">&quot;/service/Employees?$filter=Building eq $1/Building&quot;</span><span class="fu">,</span></span>
<span id="cb58-22"><a href="#cb58-22" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;headers&quot;</span><span class="fu">:</span> <span class="fu">{</span></span>
<span id="cb58-23"><a href="#cb58-23" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;accept&quot;</span><span class="fu">:</span> <span class="st">&quot;application/json&quot;</span></span>
<span id="cb58-24"><a href="#cb58-24" aria-hidden="true" tabindex="-1"></a> <span class="fu">},</span></span>
<span id="cb58-25"><a href="#cb58-25" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;body&quot;</span><span class="fu">:</span> <span class="fu">{</span></span>
<span id="cb58-26"><a href="#cb58-26" aria-hidden="true" tabindex="-1"></a> <span class="er">&lt;Filtered</span> <span class="er">list</span> <span class="er">of</span> <span class="er">employees&gt;</span></span>
<span id="cb58-27"><a href="#cb58-27" aria-hidden="true" tabindex="-1"></a> <span class="fu">}</span></span>
<span id="cb58-28"><a href="#cb58-28" aria-hidden="true" tabindex="-1"></a> <span class="fu">}</span></span>
<span id="cb58-29"><a href="#cb58-29" aria-hidden="true" tabindex="-1"></a> <span class="ot">]</span></span>
<span id="cb58-30"><a href="#cb58-30" aria-hidden="true" tabindex="-1"></a><span class="fu">}</span></span></code></pre></div>
<span id="cb58-24"><a href="#cb58-24" aria-hidden="true" tabindex="-1"></a> <span class="fu">}</span></span>
<span id="cb58-25"><a href="#cb58-25" aria-hidden="true" tabindex="-1"></a> <span class="fu">}</span></span>
<span id="cb58-26"><a href="#cb58-26" aria-hidden="true" tabindex="-1"></a> <span class="ot">]</span></span>
<span id="cb58-27"><a href="#cb58-27" aria-hidden="true" tabindex="-1"></a><span class="fu">}</span></span></code></pre></div>
</div>
<h2 id="195-processing-a-batch-request"><a name="ProcessingaBatchRequest" href="#ProcessingaBatchRequest">19.5 Processing a Batch Request</a></h2>
<p>All requests in an atomicity group represent a single change unit. A service MUST successfully process and apply all the requests in the atomicity group or else apply none of them. It is up to the service implementation to define rollback semantics to undo any requests within an atomicity group that may have been applied before another request in that same atomicity group failed.</p>
Expand Down
9 changes: 4 additions & 5 deletions docs/odata-json-format/odata-json-format.md
Original file line number Diff line number Diff line change
Expand Up @@ -3217,6 +3217,7 @@ the order listed:

- Get an Employee (with `id` = 1)
- Update the salary only if the employee has not changed

```json
POST /service/$batch HTTP/1.1
Host: host
Expand Down Expand Up @@ -3256,9 +3257,10 @@ Content-Length: ###
::: example
Example 51: a batch request that contains the following operations in
the order listed:
the order listed:

- Get an employee (with `Content-ID = 1`)
- Get all employees residing in the same building

```json
POST /service/$batch HTTP/1.1
Host: host
Expand All @@ -3279,13 +3281,10 @@ Content-Length: ###
{
"id": "2",
"dependsOn": [ "1" ],
"method": "patch",
"method": "get",
"url": "/service/Employees?$filter=Building eq $1/Building",
"headers": {
"accept": "application/json"
},
"body": {
<Filtered list of employees>
}
}
]
Expand Down
2 changes: 1 addition & 1 deletion docs/odata-protocol/odata-protocol.html
Original file line number Diff line number Diff line change
Expand Up @@ -2504,7 +2504,7 @@ <h4 id="11774-referencing-response-body-values"><a name="ReferencingResponseBody
Host: host
Accept: application/json

&lt;Filtered list of employees&gt;

--batch_36522ad7-fc75-4b56-8c71-56071383e77b--</code></pre>
</div>
<h4 id="11775-processing-a-multipart-batch-request"><a name="ProcessingaMultipartBatchRequest" href="#ProcessingaMultipartBatchRequest">11.7.7.5 Processing a Multipart Batch Request</a></h4>
Expand Down
6 changes: 5 additions & 1 deletion docs/odata-protocol/odata-protocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -6007,6 +6007,7 @@ the order listed:
A change set that contains the following requests:
- Insert a new entity (with `Content-ID = 1`)
- Insert a second new entity (references request with `Content-ID = 1`)

```
POST /service/$batch HTTP/1.1
Host: host
Expand Down Expand Up @@ -6047,6 +6048,7 @@ Content-Length: ###
::: example
Example 106: a batch request that contains the following operations in
the order listed:

- Get an employee (with `Content-ID = 1`)
- Update the salary only if the employee has not changed
```json
Expand Down Expand Up @@ -6087,8 +6089,10 @@ If-Match: $1
::: example
Example 107: a batch request that contains the following operations in
the order listed:

- Get an employee (with `Content-ID = 1`)
- Get all employees residing in the same building

```
POST /service/$batch HTTP/1.1
Host: host
Expand All @@ -6113,7 +6117,7 @@ GET /service/Employees?$filter=Building eq $1/Building HTTP/1.1
Host: host
Accept: application/json

<Filtered list of employees>

--batch_36522ad7-fc75-4b56-8c71-56071383e77b--
```
:::
Expand Down
9 changes: 4 additions & 5 deletions odata-json-format/19 Batch Requests and Responses.md
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ the order listed:

- Get an Employee (with `id` = 1)
- Update the salary only if the employee has not changed

```json
POST /service/$batch HTTP/1.1
Host: host
Expand Down Expand Up @@ -267,9 +268,10 @@ Content-Length: ###
::: example
Example ##ex: a batch request that contains the following operations in
the order listed:
the order listed:

- Get an employee (with `Content-ID = 1`)
- Get all employees residing in the same building

```json
POST /service/$batch HTTP/1.1
Host: host
Expand All @@ -290,13 +292,10 @@ Content-Length: ###
{
"id": "2",
"dependsOn": [ "1" ],
"method": "patch",
"method": "get",
"url": "/service/Employees?$filter=Building eq $1/Building",
"headers": {
"accept": "application/json"
},
"body": {
<Filtered list of employees>
}
}
]
Expand Down
6 changes: 5 additions & 1 deletion odata-protocol/11.7 Batch Requests.md
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,7 @@ the order listed:
A change set that contains the following requests:
- Insert a new entity (with `Content-ID = 1`)
- Insert a second new entity (references request with `Content-ID = 1`)

```
POST /service/$batch HTTP/1.1
Host: host
Expand Down Expand Up @@ -367,6 +368,7 @@ Content-Length: ###
::: example
Example ##ex: a batch request that contains the following operations in
the order listed:

- Get an employee (with `Content-ID = 1`)
- Update the salary only if the employee has not changed
```json
Expand Down Expand Up @@ -407,8 +409,10 @@ If-Match: $1
::: example
Example ##ex: a batch request that contains the following operations in
the order listed:

- Get an employee (with `Content-ID = 1`)
- Get all employees residing in the same building

```
POST /service/$batch HTTP/1.1
Host: host
Expand All @@ -433,7 +437,7 @@ GET /service/Employees?$filter=Building eq $1/Building HTTP/1.1
Host: host
Accept: application/json
<Filtered list of employees>
--batch_36522ad7-fc75-4b56-8c71-56071383e77b--
```
:::
Expand Down

0 comments on commit 9c74f5a

Please sign in to comment.