Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@etag: "" #2035

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/odata-json-format/odata-json-format.html
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,7 @@ <h3 id="469-control-information-editlink-and-readlink-odataeditlink-and-odatarea
<h3 id="4610-control-information-etag-odataetag"><a id="ControlInformationetagodataetag" href="#ControlInformationetagodataetag">4.6.10 Control Information: <code>etag</code> (<code>odata.etag</code>)</a></h3>
</summary>
<p>The <code>etag</code> control information MAY be applied to an <a href="#Entity">entity</a> or collection in a response. The value of the control information is an entity tag (ETag) which is an opaque string value that can be used in a subsequent request to determine if the value of the entity or collection has changed.</p>
<p>For details on how ETags are used, see <a href="https://docs.oasis-open.org/odata/odata/v4.02/odata-v4.02-part1-protocol.html#UseofETagsforAvoidingUpdateConflicts">OData-Protocol, section 11.4.1.1</a>.</p>
<p>For details on how ETags are used, see <a href="https://docs.oasis-open.org/odata/odata/v4.02/odata-v4.02-part1-protocol.html#UseofETagsforAvoidingUpdateConflicts">OData-Protocol, section 11.4.1.1</a>. The special value <code>"@etag": ""</code> is equivalent to the header <code>If-None-Match: *</code>, see <a href="https://docs.oasis-open.org/odata/odata/v4.02/odata-v4.02-part1-protocol.html#UpdateaCollectionofEntities">OData-Protocol, section 11.4.12</a>.</p>
<p>The <code>etag</code> control information is ignored in request payloads for single entities and not written in responses if <a href="#metadatanoneodatametadatanone"><code>metadata=none</code></a> is requested.</p>
</details>
<details open><summary>
Expand Down
2 changes: 2 additions & 0 deletions docs/odata-json-format/odata-json-format.md
Original file line number Diff line number Diff line change
Expand Up @@ -1047,6 +1047,8 @@ opaque string value that can be used in a subsequent request to
determine if the value of the entity or collection has changed.

For details on how ETags are used, see [OData-Protocol, section 11.4.1.1](https://docs.oasis-open.org/odata/odata/v4.02/odata-v4.02-part1-protocol.html#UseofETagsforAvoidingUpdateConflicts).
The special value `"@etag": ""` is equivalent to the header `If-None-Match: *`,
see [OData-Protocol, section 11.4.12](https://docs.oasis-open.org/odata/odata/v4.02/odata-v4.02-part1-protocol.html#UpdateaCollectionofEntities).

The `etag` control information is ignored in request payloads for
single entities and not written in responses if
Expand Down
14 changes: 10 additions & 4 deletions docs/odata-protocol/odata-protocol.html
Original file line number Diff line number Diff line change
Expand Up @@ -584,9 +584,9 @@ <h2 id="11-changes-from-earlier-versions"><a id="ChangesfromEarlierVersions" hre
<td><a href="https://github.com/oasis-tcs/odata-specs/issues/356">356</a></td>
</tr>
<tr class="odd">
<td>Section 11.4.2.2](#CreateRelatedEntitiesWhenCreatinganEntity) Deep-insert response includes at least the properties present in the request</td>
<td><a href="#CreateRelatedEntitiesWhenCreatinganEntity">Section 11.4.2.2</a></td>
<td>Deep-insert response includes at least the properties present in the request</td>
<td><a href="https://github.com/oasis-tcs/odata-specs/issues/363">363</a></td>
<td></td>
</tr>
<tr class="even">
<td><a href="#UpdateanEntity">Section 11.4.3</a></td>
Expand All @@ -604,16 +604,21 @@ <h2 id="11-changes-from-earlier-versions"><a id="ChangesfromEarlierVersions" hre
<td><a href="https://github.com/oasis-tcs/odata-specs/issues/534">534</a></td>
</tr>
<tr class="odd">
<td><a href="#UpdateaCollectionofEntities">Section 11.4.12</a></td>
<td>Control information to prevent updates</td>
<td><a href="https://github.com/oasis-tcs/odata-specs/issues/2021">2021</a></td>
</tr>
<tr class="even">
<td><a href="#ReplaceaCollectionofEntities">Section 11.4.13</a></td>
<td>Semantics of <code>continue-on-error</code> when replacing a collection of entities</td>
<td><a href="https://github.com/oasis-tcs/odata-specs/issues/358">358</a></td>
</tr>
<tr class="even">
<tr class="odd">
<td><a href="#Conformance">Section 12</a></td>
<td>Allow <code>400 Bad Request</code> in addition to <code>501 Not Implemented</code> for unsupported functionality</td>
<td><a href="https://github.com/oasis-tcs/odata-specs/issues/391">391</a></td>
</tr>
<tr class="odd">
<tr class="even">
<td><a href="#InteroperableODataClients">Section 12.3</a></td>
<td>Encoding of plus character in URLs</td>
<td><a href="https://github.com/oasis-tcs/odata-specs/issues/485">485</a></td>
Expand Down Expand Up @@ -2759,6 +2764,7 @@ <h3 id="11412-update-a-collection-of-entities"><a id="UpdateaCollectionofEntitie
<p>Clients MAY associate an id with individual nested entities in the request 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 the 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.</p>
<p>Services SHOULD advertise support for updating a collection using a delta payload through the <code>DeltaUpdateSupported</code> property of the <a href="https://github.com/oasis-tcs/odata-vocabularies/blob/main/vocabularies/Org.OData.Capabilities.V1.md#UpdateRestrictionsType"><code>Capabilities.UpdateRestrictions</code></a> term, and SHOULD advertise support for returning the <a href="https://github.com/oasis-tcs/odata-vocabularies/blob/main/vocabularies/Org.OData.Core.V1.md#ContentID"><code>Core.ContentID</code></a> through the <code>ContentIDSupported</code> property of the <a href="https://github.com/oasis-tcs/odata-vocabularies/blob/main/vocabularies/Org.OData.Capabilities.V1.md#DeepUpdateSupportType"><code>Capabilities.DeepUpdateSupport</code></a> term, both defined in <a href="#ODataVocCap">OData-VocCap</a>.</p>
<p>For each entity being updated or removed, clients MAY specify an <a href="#UseofETagsforAvoidingUpdateConflicts">ETag</a> value obtained from a previous request. If an ETag is provided that does not match the ETag value of the entity being updated or removed, or if an ETag is provided when adding or updating an entity that does not currently exist, then services that support ETags MUST NOT apply the change and instead <a href="#ErrorHandlingwhenUpdatingaCollectionofEntities">report</a> a <code>412 Precondition Failed</code> error. The special value <code>*</code> can be used to match any existing entity but fail if the entity does not already exist.</p>
<p>Added/changed entities that specify format-specific control information equivalent to an <code>If-Match-None: *</code> header <a href="https://docs.oasis-open.org/odata/odata-json-format/v4.02/odata-json-format-v4.02.html#ControlInformationetagodataetag">OData-JSON, section 4.6.10</a> MUST NOT be treated as an update.</p>
<p>The response, if requested, is a delta payload, in the same structure and order as the request payload, representing the applied changes.</p>
<details open><summary>
<h4 id="114121-error-handling-when-updating-a-collection-of-entities"><a id="ErrorHandlingwhenUpdatingaCollectionofEntities" href="#ErrorHandlingwhenUpdatingaCollectionofEntities">11.4.12.1 Error Handling when Updating a Collection of Entities</a></h4>
Expand Down
7 changes: 6 additions & 1 deletion docs/odata-protocol/odata-protocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -358,10 +358,11 @@ Section | Feature / Change | Issue
[Section 10.2](#CollectionofEntities)| Context URLs use parentheses-style keys without percent-encoding| [368](https://github.com/oasis-tcs/odata-specs/issues/368)
[Section 11.4](#DataModification)| Response code `204 No Content` after successful data modification if requested response could not be constructed| [443](https://github.com/oasis-tcs/odata-specs/issues/443)
[Section 11.4.2](#CreateanEntity)| Services can validate non-insertable property values in insert payloads| [356](https://github.com/oasis-tcs/odata-specs/issues/356)
|Section 11.4.2.2](#CreateRelatedEntitiesWhenCreatinganEntity) Deep-insert response includes at least the properties present in the request| [363](https://github.com/oasis-tcs/odata-specs/issues/363)
[Section 11.4.2.2](#CreateRelatedEntitiesWhenCreatinganEntity)| Deep-insert response includes at least the properties present in the request| [363](https://github.com/oasis-tcs/odata-specs/issues/363)
[Section 11.4.3](#UpdateanEntity)| Services can validate non-updatable property values in update payloads| [356](https://github.com/oasis-tcs/odata-specs/issues/356)
[Section 11.4.4](#UpsertanEntity)| Upserts to single-valued non-containment navigation properties| [455](https://github.com/oasis-tcs/odata-specs/issues/455)
[Section 11.4.9.3](#UpdateaComplexProperty)| Setting a complex property to a different type| [534](https://github.com/oasis-tcs/odata-specs/issues/534)
[Section 11.4.12](#UpdateaCollectionofEntities)| Control information to prevent updates| [2021](https://github.com/oasis-tcs/odata-specs/issues/2021)
[Section 11.4.13](#ReplaceaCollectionofEntities)| Semantics of `continue-on-error` when replacing a collection of entities | [358](https://github.com/oasis-tcs/odata-specs/issues/358)
[Section 12](#Conformance) | Allow `400 Bad Request` in addition to `501 Not Implemented` for unsupported functionality| [391](https://github.com/oasis-tcs/odata-specs/issues/391)
[Section 12.3](#InteroperableODataClients) | Encoding of plus character in URLs | [485](https://github.com/oasis-tcs/odata-specs/issues/485)
Expand Down Expand Up @@ -5182,6 +5183,10 @@ then services that support ETags MUST NOT apply the change and instead
[report](#ErrorHandlingwhenUpdatingaCollectionofEntities) a `412 Precondition Failed` error.
The special value `*` can be used to match any existing entity but fail if the entity does not already exist.

Added/changed entities that specify format-specific control information
equivalent to an `If-Match-None: *` header [OData-JSON, section 4.6.10](https://docs.oasis-open.org/odata/odata-json-format/v4.02/odata-json-format-v4.02.html#ControlInformationetagodataetag)
MUST NOT be treated as an update.

The response, if requested, is a delta payload, in the same structure
and order as the request payload, representing the applied changes.

Expand Down
2 changes: 2 additions & 0 deletions odata-json-format/4 Common Characteristics.md
ralfhandl marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,8 @@ opaque string value that can be used in a subsequent request to
determine if the value of the entity or collection has changed.

For details on how ETags are used, see [#OData-Protocol#UseofETagsforAvoidingUpdateConflicts].
The special value `"@etag": ""` is equivalent to the header `If-None-Match: *`,
see [#OData-Protocol#UpdateaCollectionofEntities].
ralfhandl marked this conversation as resolved.
Show resolved Hide resolved

The `etag` control information is ignored in request payloads for
single entities and not written in responses if
Expand Down
5 changes: 4 additions & 1 deletion odata-protocol/1 Introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Response code `204 No Content` after successful data modification if requested r
[Section ##CreateanEntity]|
Services can validate non-insertable property values in insert payloads|
[356](https://github.com/oasis-tcs/odata-specs/issues/356)
|Section ##CreateRelatedEntitiesWhenCreatinganEntity]
[Section ##CreateRelatedEntitiesWhenCreatinganEntity]|
Deep-insert response includes at least the properties present in the request|
[363](https://github.com/oasis-tcs/odata-specs/issues/363)
[Section ##UpdateanEntity]|
Expand All @@ -48,6 +48,9 @@ Upserts to single-valued non-containment navigation properties|
[Section ##UpdateaComplexProperty]|
Setting a complex property to a different type|
[534](https://github.com/oasis-tcs/odata-specs/issues/534)
[Section ##UpdateaCollectionofEntities]|
Control information to prevent updates|
[2021](https://github.com/oasis-tcs/odata-specs/issues/2021)
[Section ##ReplaceaCollectionofEntities]| Semantics of `continue-on-error` when replacing a collection of entities | [358](https://github.com/oasis-tcs/odata-specs/issues/358)
[Section ##Conformance] | Allow `400 Bad Request` in addition to `501 Not Implemented` for unsupported functionality| [391](https://github.com/oasis-tcs/odata-specs/issues/391)
[Section ##InteroperableODataClients] | Encoding of plus character in URLs | [485](https://github.com/oasis-tcs/odata-specs/issues/485)
Expand Down
4 changes: 4 additions & 0 deletions odata-protocol/11.4 Data Modification.md
Original file line number Diff line number Diff line change
Expand Up @@ -1167,6 +1167,10 @@ then services that support ETags MUST NOT apply the change and instead
[report](#ErrorHandlingwhenUpdatingaCollectionofEntities) a `412 Precondition Failed` error.
The special value `*` can be used to match any existing entity but fail if the entity does not already exist.

Added/changed entities that specify format-specific control information
equivalent to an `If-Match-None: *` header [#OData-JSON#ControlInformationetagodataetag]
MUST NOT be treated as an update.

The response, if requested, is a delta payload, in the same structure
and order as the request payload, representing the applied changes.

Expand Down