Skip to content

Commit

Permalink
ODATA-1133
Browse files Browse the repository at this point in the history
  • Loading branch information
ralfhandl committed Dec 8, 2023
1 parent 30d9e4d commit 2fabaa9
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 18 deletions.
8 changes: 4 additions & 4 deletions docs/odata-protocol/odata-protocol.html
Original file line number Diff line number Diff line change
Expand Up @@ -979,24 +979,24 @@ <h2 id="102-collection-of-entities"><a name="CollectionofEntities" href="#Collec
<pre><code>http://host/service/Orders(4711)/Items
http://host/service/$metadata#Orders(4711)/Items</code></pre>
</div>
<p>If the entities in the response are not bound to a single entity set, such as from a function or action with no entity set path, a function import or action import with no specified entity set, or a navigation property with no navigation property binding, the context URL specifies the type of the returned entity collection.</p>
<p>If the entities in the response are not bound to a single entity set, such as from a function or action with no entity set path, a function import or action import with no specified entity set, or a navigation property with no navigation property binding, the context URL fragment specifies the type of the returned entity collection.</p>
<h2 id="103-entity"><a name="Entity" href="#Entity">10.3 Entity</a></h2>
<p>Context URL template:</p>
<pre><code>{context-url}#{entity-set}/$entity
{context-url}#{type-name}</code></pre>
<p>If a response or response part is a single entity of the declared type of an entity set, <code>/$entity</code> is appended to the context URL.</p>
<p>If a response or response part is a single entity of the declared type of an entity set, its name with <code>/$entity</code> appended is the context URL fragment.</p>
<div class="example">
<p>Example 13: resource URL and corresponding context URL</p>
<pre><code>http://host/service/Customers(1)
http://host/service/$metadata#Customers/$entity</code></pre>
</div>
<p>If the entity is contained, then <code>entity-set</code> is the canonical URL for the containment navigation property of the containing entity, e.g. Orders(4711)/Items.</p>
<p>If the entity is contained, then <code>entity-set</code> is the top-level entity set or singleton followed by the path to the containment navigation property of the containing entity.</p>
<div class="example">
<p>Example 14: resource URL and corresponding context URL for contained entity</p>
<pre><code>http://host/service/Orders(4711)/Items(1)
http://host/service/$metadata#Orders(4711)/Items/$entity</code></pre>
</div>
<p>If the response is not bound to a single entity set, such as an entity returned from a function or action with no entity set path, a function import or action import with no specified entity set, or a navigation property with no navigation property binding, the context URL specifies the type of the returned entity.</p>
<p>If the entity is not bound to an entity set, such as an entity returned from a function or action with no entity set path, a function import or action import with no specified entity set, or a navigation property with no navigation property binding, the context URL fragment specifies the type of the returned entity.</p>
<h2 id="104-singleton"><a name="Singleton" href="#Singleton">10.4 Singleton</a></h2>
<p>Context URL template:</p>
<pre><code>{context-url}#{singleton}</code></pre>
Expand Down
15 changes: 8 additions & 7 deletions docs/odata-protocol/odata-protocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -2050,7 +2050,7 @@ http://host/service/$metadata#Orders(4711)/Items
If the entities in the response are not bound to a single entity set,
such as from a function or action with no entity set path, a function
import or action import with no specified entity set, or a navigation
property with no navigation property binding, the context URL specifies
property with no navigation property binding, the context URL fragment specifies
the type of the returned entity collection.

## <a name="Entity" href="#Entity">10.3 Entity</a>
Expand All @@ -2061,7 +2061,8 @@ Context URL template:
{context-url}#{type-name}

If a response or response part is a single entity of the declared type
of an entity set, `/$entity` is appended to the context URL.
of an entity set, its
name with `/$entity` appended is the context URL fragment.

::: example
Example 13: resource URL and corresponding context URL
Expand All @@ -2071,9 +2072,9 @@ http://host/service/$metadata#Customers/$entity
```
:::

If the entity is contained, then `entity-set` is the canonical URL for
the containment navigation property of the containing entity, e.g.
Orders(4711)/Items.
If the entity is contained, then `entity-set` is the top-level entity
set or singleton followed by the path to the containment navigation
property of the containing entity.

::: example
Example 14: resource URL and corresponding context URL for contained
Expand All @@ -2084,10 +2085,10 @@ http://host/service/$metadata#Orders(4711)/Items/$entity
```
:::

If the response is not bound to a single entity set, such as an entity
If the entity is not bound to an entity set, such as an entity
returned from a function or action with no entity set path, a function
import or action import with no specified entity set, or a navigation
property with no navigation property binding, the context URL specifies
property with no navigation property binding, the context URL fragment specifies
the type of the returned entity.

## <a name="Singleton" href="#Singleton">10.4 Singleton</a>
Expand Down
15 changes: 8 additions & 7 deletions odata-protocol/10 Context URL.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ http://host/service/$metadata#Orders(4711)/Items
If the entities in the response are not bound to a single entity set,
such as from a function or action with no entity set path, a function
import or action import with no specified entity set, or a navigation
property with no navigation property binding, the context URL specifies
property with no navigation property binding, the context URL fragment specifies
the type of the returned entity collection.

## ##subsec Entity
Expand All @@ -105,7 +105,8 @@ Context URL template:
{context-url}#{type-name}

If a response or response part is a single entity of the declared type
of an entity set, `/$entity` is appended to the context URL.
of an entity set, its
name with `/$entity` appended is the context URL fragment.

::: example
Example ##ex: resource URL and corresponding context URL
Expand All @@ -115,9 +116,9 @@ http://host/service/$metadata#Customers/$entity
```
:::

If the entity is contained, then `entity-set` is the canonical URL for
the containment navigation property of the containing entity, e.g.
Orders(4711)/Items.
If the entity is contained, then `entity-set` is the top-level entity
set or singleton followed by the path to the containment navigation
property of the containing entity.

::: example
Example ##ex: resource URL and corresponding context URL for contained
Expand All @@ -128,10 +129,10 @@ http://host/service/$metadata#Orders(4711)/Items/$entity
```
:::

If the response is not bound to a single entity set, such as an entity
If the entity is not bound to an entity set, such as an entity
returned from a function or action with no entity set path, a function
import or action import with no specified entity set, or a navigation
property with no navigation property binding, the context URL specifies
property with no navigation property binding, the context URL fragment specifies
the type of the returned entity.

## ##subsec Singleton
Expand Down

0 comments on commit 2fabaa9

Please sign in to comment.