Skip to content

Commit

Permalink
Merge branch 'main' into ODATA-1624
Browse files Browse the repository at this point in the history
  • Loading branch information
ralfhandl committed Feb 22, 2024
2 parents 44b84bc + d642c03 commit 673a355
Show file tree
Hide file tree
Showing 8 changed files with 51 additions and 38 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ jobs:
node-version: [20.x]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
Expand All @@ -23,6 +23,7 @@ jobs:
pandoc-version: 3.1.11.1
- name: Build docs
run: |
export PUPPETEER_SKIP_DOWNLOAD='true'
npm ci
npm run build
git diff --exit-code docs
12 changes: 9 additions & 3 deletions docs/odata-protocol/odata-protocol.html
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,11 @@ <h2 id="11-changes-from-earlier-versions"><a name="ChangesfromEarlierVersions" h
<td>Allow <code>400 Bad Request</code> in addition to <code>501 Not Implemented</code> for unsupported functionality</td>
<td><a href="https://issues.oasis-open.org/browse/ODATA-1624">ODATA-1624</a></td>
</tr>
<tr class="odd">
<td><a href="#InteroperableODataClients">Section 12.3</a></td>
<td>Encoding of plus character in URLs</td>
<td><a href="https://issues.oasis-open.org/browse/ODATA-1540">ODATA-1540</a></td>
</tr>
</tbody>
</table>
<h2 id="12-glossary"><a name="Glossary" href="#Glossary">1.2 Glossary</a></h2>
Expand Down Expand Up @@ -2289,7 +2294,7 @@ <h3 id="1173-identifying-individual-requests"><a name="IdentifyingIndividualRequ
<p>Each individual request within a batch request MAY have a request identifier assigned. The request identifier is case-sensitive, MUST be unique within the batch request, and MUST satisfy the rule <code>request-id</code> in <a href="#ODataABNF">OData-ABNF</a>.</p>
<p>The representation of the request identifier is format-specific, as are the rules for which individual requests require an identifier.</p>
<h3 id="1174-referencing-returned-entities"><a name="ReferencingReturnedEntities" href="#ReferencingReturnedEntities">11.7.4 Referencing Returned Entities</a></h3>
<p>Entities created by an <a href="#CreateanEntity">insert</a> request can be referenced in the request URL of subsequent requests by using the request identifier prefixed with a <code>$</code> character as the first segment of the request URL. If the <a href="#HeaderLocation"><code>Location</code></a> header in the response contains a relative URL, clients MUST be able to resolve it relative to the request’s URL even if that contains such a reference.</p>
<p>Entities created by an <a href="#CreateanEntity">insert</a> request or an <a href="#InvokinganAction">action</a> can be referenced in the request URL of subsequent requests by using the request identifier prefixed with a <code>$</code> character as the first segment of the request URL. If the <a href="#HeaderLocation"><code>Location</code></a> header in the response contains a relative URL, clients MUST be able to resolve it relative to the request’s URL even if that contains such a reference.</p>
<p>If the <code>$</code>-prefixed request identifier is identical to the name of a top-level system resource (<code>$batch</code>, <code>$crossjoin</code>, <code>$all</code>, <code>$entity</code>, <code>$root</code>, <code>$id</code>, <code>$metadata</code>, or other system resources defined according to the <a href="#HeaderODataVersion"><code>OData-Version</code></a> of the protocol specified in the request), then the reference to the top-level system resource is used. This collision can be avoided by e.g. using only numeric request identifiers.</p>
<p>Services MAY also support referencing within request bodies, in which case they SHOULD advertise this support by specifying the <code>ReferencesInRequestBodiesSupported</code> property in the <a href="https://github.com/oasis-tcs/odata-vocabularies/blob/master/vocabularies/Org.OData.Capabilities.V1.md#BatchSupport"><code>Capabilities.BatchSupport</code></a> term applied to the entity container, see <a href="#ODataVocCap">OData-VocCap</a>.</p>
<h3 id="1175-referencing-the-etag-of-an-entity"><a name="ReferencingtheETagofanEntity" href="#ReferencingtheETagofanEntity">11.7.5 Referencing the ETag of an Entity</a></h3>
Expand Down Expand Up @@ -2402,7 +2407,7 @@ <h4 id="11771-multipart-batch-request-body"><a name="MultipartBatchRequestBody"
--batch_36522ad7-fc75-4b56-8c71-56071383e77b--</code></pre>
</div>
<h4 id="11772-referencing-new-entities"><a name="ReferencingNewEntities" href="#ReferencingNewEntities">11.7.7.2 Referencing New Entities</a></h4>
<p>Entities created by an <a href="#CreateanEntity">Insert</a> request can be referenced in the request URL of subsequent requests within the same change set. Services MAY also support referencing across change sets, in which case they SHOULD advertise this support by specifying the <code>ReferencesAcrossChangeSetsSupported</code> property in the <a href="https://github.com/oasis-tcs/odata-vocabularies/blob/master/vocabularies/Org.OData.Capabilities.V1.md#BatchSupport"><code>Capabilities.BatchSupport</code></a> term applied to the entity container, see <a href="#ODataVocCap">OData-VocCap</a>.</p>
<p>Entities created by an <a href="#CreateanEntity">insert</a> request or an <a href="#InvokinganAction">action</a> can be referenced in the request URL of subsequent requests within the same change set. Services MAY also support referencing across change sets, in which case they SHOULD advertise this support by specifying the <code>ReferencesAcrossChangeSetsSupported</code> property in the <a href="https://github.com/oasis-tcs/odata-vocabularies/blob/master/vocabularies/Org.OData.Capabilities.V1.md#BatchSupport"><code>Capabilities.BatchSupport</code></a> term applied to the entity container, see <a href="#ODataVocCap">OData-VocCap</a>.</p>
<div class="example">
<p>Example 105: a batch request that contains the following operations in the order listed:</p>
<p>A change set that contains the following requests:</p>
Expand Down Expand Up @@ -2865,6 +2870,7 @@ <h2 id="123-interoperable-odata-clients"><a name="InteroperableODataClients" hre
<li>MUST generate <code>PATCH</code> requests for updates, if the client supports updates (<a href="#UpdateanEntity">section 11.4.3</a>)</li>
<li>MUST include the <code>$</code> prefix when specifying OData-defined system query options</li>
<li>MUST use case-sensitive query options, operators, and canonical functions</li>
<li>MUST encode the plus character (octet <code>0x2B</code>) as <code>%2B</code> in URLs to avoid servers mis-interpreting the plus character as an encoded space</li>
<li>SHOULD support basic authentication as defined in <a href="#rfc7617">RFC7617</a> over HTTPS</li>
<li>MAY request entity references in place of entities previously returned in the response (<a href="#RequestingEntityReferences">section 11.2.8</a>)</li>
<li>MAY support deleted entities, link entities, deleted link entities in a delta response (<a href="#RequestingChanges">section 11.3</a>)</li>
Expand All @@ -2873,7 +2879,7 @@ <h2 id="123-interoperable-odata-clients"><a name="InteroperableODataClients" hre
<li>MAY support <code>streaming</code> in a JSON response (see <a href="#ODataJSON">OData-JSON</a>)</li>
</ol>
<p>In addition, interoperable OData 4.01 clients</p>
<ol start="16" type="1">
<ol start="17" type="1">
<li>MUST send OData 4.0-compliant payloads to services that don’t advertise support for 4.01 or greater through the <a href="https://github.com/oasis-tcs/odata-vocabularies/blob/master/vocabularies/Org.OData.Core.V1.md#ODataVersions"><code>Core.ODataVersions</code></a> metadata annotation (see <a href="#ODataVocCore">OData-VocCore</a>)</li>
<li>MUST specify identifiers in payloads and URLs in the case they are specified in <code>$metadata</code></li>
<li>MUST be prepared to receive any valid 4.01 CSDL</li>
Expand Down
28 changes: 15 additions & 13 deletions docs/odata-protocol/odata-protocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,7 @@ Section | Feature / Change | Issue
[Section 11.4.4](#UpsertanEntity)| Upserts to single-valued non-containment navigation properties| [ODATA-1588](https://issues.oasis-open.org/browse/ODATA-1588)
[Section 11.4.9.3](#UpdateaComplexProperty)| Setting a complex property to a different type| [ODATA-1472](https://issues.oasis-open.org/browse/ODATA-1472)
[Section 12](#Conformance)| Allow `400 Bad Request` in addition to `501 Not Implemented` for unsupported functionality| [ODATA-1624](https://issues.oasis-open.org/browse/ODATA-1624)
[Section 12.3](#InteroperableODataClients) | Encoding of plus character in URLs | [ODATA-1540](https://issues.oasis-open.org/browse/ODATA-1540)

## <a name="Glossary" href="#Glossary">1.2 Glossary</a>

Expand Down Expand Up @@ -5783,7 +5784,7 @@ the rules for which individual requests require an identifier.

### <a name="ReferencingReturnedEntities" href="#ReferencingReturnedEntities">11.7.4 Referencing Returned Entities</a>

Entities created by an [insert](#CreateanEntity) request can be
Entities created by an [insert](#CreateanEntity) request or an [action](#InvokinganAction) can be
referenced in the request URL of subsequent requests by using the
request identifier prefixed with a `$` character as the first segment of
the request URL. If the [`Location`](#HeaderLocation) header in the response contains a relative URL,
Expand Down Expand Up @@ -5993,7 +5994,7 @@ Host: host

#### <a name="ReferencingNewEntities" href="#ReferencingNewEntities">11.7.7.2 Referencing New Entities</a>

Entities created by an [Insert](#CreateanEntity) request can be
Entities created by an [insert](#CreateanEntity) request or an [action](#InvokinganAction) can be
referenced in the request URL of subsequent requests within the same
change set. Services MAY also support referencing across change sets, in
which case they SHOULD advertise this support by specifying the
Expand Down Expand Up @@ -6728,30 +6729,31 @@ updates ([section 11.4.3](#UpdateanEntity))
query options
9. MUST use case-sensitive query options, operators, and canonical
functions
10. SHOULD support basic authentication as defined in
10. MUST encode the plus character (octet `0x2B`) as `%2B` in URLs to avoid servers mis-interpreting the plus character as an encoded space
11. SHOULD support basic authentication as defined in
[RFC7617](#rfc7617) over HTTPS
11. MAY request entity references in place of entities previously
12. MAY request entity references in place of entities previously
returned in the response ([section 11.2.8](#RequestingEntityReferences))
12. MAY support deleted entities, link entities, deleted link entities
13. MAY support deleted entities, link entities, deleted link entities
in a delta response ([section 11.3](#RequestingChanges))
13. MAY support asynchronous responses ([section 11.6](#AsynchronousRequests))
14. MAY support `metadata=minimal` in a JSON response (see
14. MAY support asynchronous responses ([section 11.6](#AsynchronousRequests))
15. MAY support `metadata=minimal` in a JSON response (see
[OData-JSON](#ODataJSON))
15. MAY support `streaming` in a JSON response (see
16. MAY support `streaming` in a JSON response (see
[OData-JSON](#ODataJSON))

In addition, interoperable OData 4.01 clients

16. MUST send OData 4.0-compliant payloads to services that don't
17. MUST send OData 4.0-compliant payloads to services that don't
advertise support for 4.01 or greater through the
[`Core.ODataVersions`](https://github.com/oasis-tcs/odata-vocabularies/blob/master/vocabularies/Org.OData.Core.V1.md#ODataVersions)
metadata annotation (see [OData-VocCore](#ODataVocCore))
17. MUST specify identifiers in payloads and URLs in the case they are
18. MUST specify identifiers in payloads and URLs in the case they are
specified in `$metadata`
18. MUST be prepared to receive any valid 4.01 CSDL
19. MUST be prepared to receive any valid 4.01 response according to
19. MUST be prepared to receive any valid 4.01 CSDL
20. MUST be prepared to receive any valid 4.01 response according to
the requested format
20. SHOULD use capabilities (see [OData-VocCap](#ODataVocCap)) to
21. SHOULD use capabilities (see [OData-VocCap](#ODataVocCap)) to
determine if a 4.01 feature is supported but MAY attempt syntax and be
prepared to handle `400 Bad Request` or [`501 Not Implemented`](#ResponseCode501NotImplemented)

Expand Down
1 change: 1 addition & 0 deletions odata-protocol/1 Introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ Setting a complex property to a different type|
[Section ##Conformance]|
Allow `400 Bad Request` in addition to `501 Not Implemented` for unsupported functionality|
[ODATA-1624](https://issues.oasis-open.org/browse/ODATA-1624)
[Section ##InteroperableODataClients] | Encoding of plus character in URLs | [ODATA-1540](https://issues.oasis-open.org/browse/ODATA-1540)

## ##subsec Glossary

Expand Down
4 changes: 2 additions & 2 deletions odata-protocol/11.7 Batch Requests.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ the rules for which individual requests require an identifier.

### ##subsubsec Referencing Returned Entities

Entities created by an [insert](#CreateanEntity) request can be
Entities created by an [insert](#CreateanEntity) request or an [action](#InvokinganAction) can be
referenced in the request URL of subsequent requests by using the
request identifier prefixed with a `$` character as the first segment of
the request URL. If the [`Location`](#HeaderLocation) header in the response contains a relative URL,
Expand Down Expand Up @@ -312,7 +312,7 @@ Host: host

#### ##subsubsubsec Referencing New Entities

Entities created by an [Insert](#CreateanEntity) request can be
Entities created by an [insert](#CreateanEntity) request or an [action](#InvokinganAction) can be
referenced in the request URL of subsequent requests within the same
change set. Services MAY also support referencing across change sets, in
which case they SHOULD advertise this support by specifying the
Expand Down
23 changes: 12 additions & 11 deletions odata-protocol/12 Conformance.md
Original file line number Diff line number Diff line change
Expand Up @@ -381,29 +381,30 @@ updates ([section ##UpdateanEntity])
query options
9. MUST use case-sensitive query options, operators, and canonical
functions
10. SHOULD support basic authentication as defined in
10. MUST encode the plus character (octet `0x2B`) as `%2B` in URLs to avoid servers mis-interpreting the plus character as an encoded space
11. SHOULD support basic authentication as defined in
[RFC7617](#rfc7617) over HTTPS
11. MAY request entity references in place of entities previously
12. MAY request entity references in place of entities previously
returned in the response ([section ##RequestingEntityReferences])
12. MAY support deleted entities, link entities, deleted link entities
13. MAY support deleted entities, link entities, deleted link entities
in a delta response ([section ##RequestingChanges])
13. MAY support asynchronous responses ([section ##AsynchronousRequests])
14. MAY support `metadata=minimal` in a JSON response (see
14. MAY support asynchronous responses ([section ##AsynchronousRequests])
15. MAY support `metadata=minimal` in a JSON response (see
[OData-JSON](#ODataJSON))
15. MAY support `streaming` in a JSON response (see
16. MAY support `streaming` in a JSON response (see
[OData-JSON](#ODataJSON))

In addition, interoperable OData 4.01 clients

16. MUST send OData 4.0-compliant payloads to services that don't
17. MUST send OData 4.0-compliant payloads to services that don't
advertise support for 4.01 or greater through the
[`Core.ODataVersions`](https://github.com/oasis-tcs/odata-vocabularies/blob/master/vocabularies/Org.OData.Core.V1.md#ODataVersions)
metadata annotation (see [OData-VocCore](#ODataVocCore))
17. MUST specify identifiers in payloads and URLs in the case they are
18. MUST specify identifiers in payloads and URLs in the case they are
specified in `$metadata`
18. MUST be prepared to receive any valid 4.01 CSDL
19. MUST be prepared to receive any valid 4.01 response according to
19. MUST be prepared to receive any valid 4.01 CSDL
20. MUST be prepared to receive any valid 4.01 response according to
the requested format
20. SHOULD use capabilities (see [OData-VocCap](#ODataVocCap)) to
21. SHOULD use capabilities (see [OData-VocCap](#ODataVocCap)) to
determine if a 4.01 feature is supported but MAY attempt syntax and be
prepared to handle `400 Bad Request` or [`501 Not Implemented`](#ResponseCode501NotImplemented)
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion test/build.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ const Number = require("../lib/number");
const pandoc = require("../lib/pandoc");
const { compareSectionNumbers } = require("../lib/utilities");
const puppeteer = require("puppeteer");
const url = require("url");
const assert = require("assert");
const { PassThrough } = require("stream");

Expand Down Expand Up @@ -44,7 +45,8 @@ describe("OASIS doc build", function () {
it("Puppeteer", async function () {
var browser = await puppeteer.launch({ headless: "new" });
var page = await browser.newPage();
await page.goto(__dirname + "/test-data/test.html", {
const htmlUrl = url.pathToFileURL(`${__dirname}/test-data/test.html`).href;
await page.goto(htmlUrl, {
waitUntil: "networkidle2",
});
var box = await (await page.$("mjx-c.mjx-c1D6FC.TEX-I")).boxModel();
Expand Down

0 comments on commit 673a355

Please sign in to comment.