Skip to content

Commit

Permalink
Address review feedback.
Browse files Browse the repository at this point in the history
Have section 15.3 refer to section 4.5 for ordering constraints.
  • Loading branch information
mikepizzo committed Oct 16, 2024
1 parent aadea0d commit 820ebd4
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 30 deletions.
6 changes: 3 additions & 3 deletions docs/odata-json-format/odata-json-format.html
Original file line number Diff line number Diff line change
Expand Up @@ -1476,10 +1476,10 @@ <h2 id="153-deleted-entity"><a id="DeletedEntity" href="#DeletedEntity">15.3 Del
<span id="cb38-4"><a href="#cb38-4" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;id&quot;</span><span class="fu">:</span> <span class="st">&quot;Customers(&#39;ANTON&#39;)&quot;</span></span>
<span id="cb38-5"><a href="#cb38-5" aria-hidden="true" tabindex="-1"></a><span class="fu">}</span></span></code></pre></div>
</div>
<p>In OData 4.01 payloads the deleted-entity object MUST include the following properties, regardless of the specified <a href="#ControllingtheAmountofControlInformationinResponses"><code>metadata</code></a> value:</p>
<p>In OData 4.01 payloads the deleted-entity object MUST include the following properties regardless of the specified <a href="#ControllingtheAmountofControlInformationinResponses"><code>metadata</code></a> value. For ordered payloads, this control information MUST follow the <a href="#PayloadOrderingConstraints">payload ordering constraints</a>.</p>
<ul>
<li><p>Control information <a href="#ControlInformationremovedodataremoved"><code>removed</code></a>, whose value is an object that MAY contain a property named <code>reason</code>. If present, the value of <code>reason</code> MUST be either <code>deleted</code> if the entity was deleted (destroyed), or <code>changed</code> if the entity was removed from membership in the result either due to change in value such that the entity no longer matches the defining query or because the entity was removed from the collection. The object MAY include <a href="#InstanceAnnotations">annotations</a>, and clients SHOULD NOT error due to the presence of additional properties that MAY be defined by future versions of this specification. For <a href="#PayloadOrderingConstraints">ordered payloads</a>, the control information <a href="#ControlInformationremovedodataremoved"><code>removed</code></a> MUST immediately follow the <a href="#ControlInformationcontextodatacontext"><code>context</code></a> control information, if present, otherwise it MUST be the first property in the deleted entity.</p></li>
<li><p>Control information <a href="#ControlInformationidodataid"><code>id</code></a> or all of the entity’s primary key fields. The <code>id</code> control information MUST appear if any of the entity’s primary key fields are omitted from the response <em>or</em> the entity-id is not identical to the canonical URL of the entity. When using a delta payload in an <a href="#UpdateaCollectionofEntities">update request</a>, an <a href="https://github.com/oasis-tcs/odata-vocabularies/blob/main/vocabularies/Org.OData.Core.V1.md#AlternateKeys">alternate key</a> (see <em>Alternate Keys</em> in <a href="#ODataURL">OData-URL</a>) MAY be used in place of the entity’s primary key. A delta response from an update request using alternate keys SHOULD include all fields of the alternate key used in the request, in which case it MAY omit the <code>id</code> control information and other primary key fields. For <a href="#PayloadOrderingConstraints">ordered payloads</a>, the control information <code>id</code>, if present, MUST appear following the control information <a href="#ControlInformationremovedodataremoved"><code>removed</code></a> and, if present, <a href="#ControlInformationtypeodatatype"><code>type</code></a>, and before any other properties or control information.</p></li>
<li><p>Control information <a href="#ControlInformationremovedodataremoved"><code>removed</code></a>, whose value is an object that MAY contain a property named <code>reason</code>. If present, the value of <code>reason</code> MUST be either <code>deleted</code> if the entity was deleted (destroyed), or <code>changed</code> if the entity was removed from membership in the result either due to change in value such that the entity no longer matches the defining query or because the entity was removed from the collection. The object MAY include <a href="#InstanceAnnotations">annotations</a>, and clients SHOULD NOT error due to the presence of additional properties that MAY be defined by future versions of this specification.</p></li>
<li><p>Control information <a href="#ControlInformationidodataid"><code>id</code></a> or all of the entity’s primary key fields. The <code>id</code> control information MUST appear if any of the entity’s primary key fields are omitted from the response <em>or</em> the entity-id is not identical to the canonical URL of the entity. When using a delta payload in an <a href="#UpdateaCollectionofEntities">update request</a>, an <a href="https://github.com/oasis-tcs/odata-vocabularies/blob/main/vocabularies/Org.OData.Core.V1.md#AlternateKeys">alternate key</a> (see <em>Alternate Keys</em> in <a href="#ODataURL">OData-URL</a>) MAY be used in place of the entity’s primary key. A delta response from an update request using alternate keys SHOULD include all fields of the alternate key used in the request, in which case it MAY omit the <code>id</code> control information and other primary key fields.</p></li>
</ul>
<p>For full metadata the <a href="#ControlInformationcontextodatacontext"><code>context</code></a> control information MUST be included. It also MUST be included if the entity set of the deleted entity cannot be determined from the surrounding context.</p>
<p>The deleted-entity object MAY include additional properties of the entity, as well as <a href="#InstanceAnnotations">annotations</a>, and MAY include related entities, related deleted entities, or a delta or full representation of a related collection of entities, to represent related entities that have been modified or deleted.</p>
Expand Down
18 changes: 5 additions & 13 deletions docs/odata-json-format/odata-json-format.md
Original file line number Diff line number Diff line change
Expand Up @@ -2273,8 +2273,9 @@ a property, not control information
:::

In OData 4.01 payloads the deleted-entity object MUST include the
following properties, regardless of the specified
[`metadata`](#ControllingtheAmountofControlInformationinResponses) value:
following properties regardless of the specified
[`metadata`](#ControllingtheAmountofControlInformationinResponses) value.
For ordered payloads, this control information MUST follow the [payload ordering constraints](#PayloadOrderingConstraints).

- Control information
[`removed`](#ControlInformationremovedodataremoved),
Expand All @@ -2287,12 +2288,7 @@ following properties, regardless of the specified
collection. The object MAY include
[annotations](#InstanceAnnotations), and clients SHOULD NOT error
due to the presence of additional properties that MAY be defined by
future versions of this specification. For [ordered
payloads](#PayloadOrderingConstraints), the control information
[`removed`](#ControlInformationremovedodataremoved) MUST immediately
follow the [`context`](#ControlInformationcontextodatacontext) control
information, if present, otherwise it MUST be the first property in the
deleted entity.
future versions of this specification.

- Control information
[`id`](#ControlInformationidodataid)
Expand All @@ -2301,11 +2297,7 @@ following properties, regardless of the specified
from the response _or_ the entity-id is not identical to the canonical
URL of the entity. When using a delta payload in an [update request](#UpdateaCollectionofEntities), an [alternate key](https://github.com/oasis-tcs/odata-vocabularies/blob/main/vocabularies/Org.OData.Core.V1.md#AlternateKeys) (see _Alternate Keys_ in [OData-URL](#ODataURL))
MAY be used in place of the entity's primary key. A delta response from an update request using alternate keys SHOULD include all fields of the alternate key used in the request, in which case it
MAY omit the `id` control information and other primary key fields. For [ordered
payloads](#PayloadOrderingConstraints), the control information
`id`, if present, MUST appear following the control information
[`removed`](#ControlInformationremovedodataremoved) and, if present, [`type`](#ControlInformationtypeodatatype), and before any other
properties or control information.
MAY omit the `id` control information and other primary key fields.

For full metadata the
[`context`](#ControlInformationcontextodatacontext)
Expand Down
20 changes: 6 additions & 14 deletions odata-json-format/15 Delta Payload.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,10 @@ a property, not control information
:::

In OData 4.01 payloads the deleted-entity object MUST include the
following properties, regardless of the specified
[`metadata`](#ControllingtheAmountofControlInformationinResponses) value:
following properties regardless of the specified
[`metadata`](#ControllingtheAmountofControlInformationinResponses) value.
For ordered payloads, this control information MUST follow the
[payload ordering constraints](#PayloadOrderingConstraints).

- Control information
[`removed`](#ControlInformationremovedodataremoved),
Expand All @@ -194,12 +196,7 @@ following properties, regardless of the specified
collection. The object MAY include
[annotations](#InstanceAnnotations), and clients SHOULD NOT error
due to the presence of additional properties that MAY be defined by
future versions of this specification. For [ordered
payloads](#PayloadOrderingConstraints), the control information
[`removed`](#ControlInformationremovedodataremoved) MUST immediately
follow the [`context`](#ControlInformationcontextodatacontext) control
information, if present, otherwise it MUST be the first property in the
deleted entity.
future versions of this specification.

- Control information
[`id`](#ControlInformationidodataid)
Expand All @@ -209,12 +206,7 @@ following properties, regardless of the specified
URL of the entity. When using a delta payload in an
[update request](#UpdateaCollectionofEntities), an [alternate key](https://github.com/oasis-tcs/odata-vocabularies/blob/main/vocabularies/Org.OData.Core.V1.md#AlternateKeys) (see _Alternate Keys_ in [OData-URL](#ODataURL))
MAY be used in place of the entity's primary key. A delta response from an update request using alternate keys SHOULD include all fields of the alternate key used in the request, in which case it
MAY omit the `id` control information and other primary key fields. For [ordered
payloads](#PayloadOrderingConstraints), the control information
`id`, if present, MUST appear following the control information
[`removed`](#ControlInformationremovedodataremoved) and, if present,
[`type`](#ControlInformationtypeodatatype), and before any other
properties or control information.
MAY omit the `id` control information and other primary key fields.

For full metadata the
[`context`](#ControlInformationcontextodatacontext)
Expand Down

0 comments on commit 820ebd4

Please sign in to comment.