-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
70bb405
commit b2612ec
Showing
5 changed files
with
151 additions
and
133 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3101,34 +3101,38 @@ <h3 id="14412-record"><a name="Record" href="#Record">14.4.12 Record</a></h3> | |
</div> | ||
<div class="varjson example"> | ||
<p>Example 87: this annotation "morphs" the entity type from <a href="#entitytype">example 8</a> into a structured type with two structural properties <code>GivenName</code> and <code>Surname</code> and two navigation properties <code>DirectSupervisor</code> and <code>CostCenter</code>. The first three properties simply rename properties of the annotated entity type, the fourth adds a calculated navigation property that is pointing to a different service</p> | ||
<div class="sourceCode" id="cb94"><pre class="sourceCode json"><code class="sourceCode json"><span id="cb94-1"><a href="#cb94-1" aria-hidden="true" tabindex="-1"></a><span class="er">"@person.Employee":</span> <span class="fu">{</span></span> | ||
<span id="cb94-2"><a href="#cb94-2" aria-hidden="true" tabindex="-1"></a> <span class="dt">"@type"</span><span class="fu">:</span> <span class="st">"https://example.org/vocabs/person#org.example.person.Manager"</span><span class="fu">,</span></span> | ||
<span id="cb94-3"><a href="#cb94-3" aria-hidden="true" tabindex="-1"></a> <span class="dt">"@Core.Description"</span><span class="fu">:</span> <span class="st">"Annotation on record"</span><span class="fu">,</span></span> | ||
<span id="cb94-4"><a href="#cb94-4" aria-hidden="true" tabindex="-1"></a> <span class="dt">"GivenName"</span><span class="fu">:</span> <span class="fu">{</span></span> | ||
<span id="cb94-5"><a href="#cb94-5" aria-hidden="true" tabindex="-1"></a> <span class="dt">"$Path"</span><span class="fu">:</span> <span class="st">"FirstName"</span></span> | ||
<span id="cb94-6"><a href="#cb94-6" aria-hidden="true" tabindex="-1"></a> <span class="fu">},</span></span> | ||
<span id="cb94-7"><a href="#cb94-7" aria-hidden="true" tabindex="-1"></a> <span class="dt">"[email protected]"</span><span class="fu">:</span> <span class="st">"Annotation on record member"</span><span class="fu">,</span></span> | ||
<span id="cb94-8"><a href="#cb94-8" aria-hidden="true" tabindex="-1"></a> <span class="dt">"Surname"</span><span class="fu">:</span> <span class="fu">{</span></span> | ||
<span id="cb94-9"><a href="#cb94-9" aria-hidden="true" tabindex="-1"></a> <span class="dt">"$Path"</span><span class="fu">:</span> <span class="st">"LastName"</span></span> | ||
<span id="cb94-10"><a href="#cb94-10" aria-hidden="true" tabindex="-1"></a> <span class="fu">},</span></span> | ||
<span id="cb94-11"><a href="#cb94-11" aria-hidden="true" tabindex="-1"></a> <span class="dt">"DirectSupervisor"</span><span class="fu">:</span> <span class="fu">{</span></span> | ||
<span id="cb94-12"><a href="#cb94-12" aria-hidden="true" tabindex="-1"></a> <span class="dt">"$Path"</span><span class="fu">:</span> <span class="st">"Manager"</span></span> | ||
<span id="cb94-13"><a href="#cb94-13" aria-hidden="true" tabindex="-1"></a> <span class="fu">},</span></span> | ||
<span id="cb94-14"><a href="#cb94-14" aria-hidden="true" tabindex="-1"></a> <span class="dt">"CostCenter"</span><span class="fu">:</span> <span class="fu">{</span></span> | ||
<span id="cb94-15"><a href="#cb94-15" aria-hidden="true" tabindex="-1"></a> <span class="dt">"$UrlRef"</span><span class="fu">:</span> <span class="fu">{</span></span> | ||
<span id="cb94-16"><a href="#cb94-16" aria-hidden="true" tabindex="-1"></a> <span class="dt">"$Apply"</span><span class="fu">:</span> <span class="ot">[</span></span> | ||
<span id="cb94-17"><a href="#cb94-17" aria-hidden="true" tabindex="-1"></a> <span class="st">"http://host/anotherservice/CostCenters('{ccid}')"</span><span class="ot">,</span></span> | ||
<span id="cb94-18"><a href="#cb94-18" aria-hidden="true" tabindex="-1"></a> <span class="fu">{</span></span> | ||
<span id="cb94-19"><a href="#cb94-19" aria-hidden="true" tabindex="-1"></a> <span class="dt">"$LabeledElement"</span><span class="fu">:</span> <span class="fu">{</span></span> | ||
<span id="cb94-20"><a href="#cb94-20" aria-hidden="true" tabindex="-1"></a> <span class="dt">"$Path"</span><span class="fu">:</span> <span class="st">"CostCenterID"</span></span> | ||
<span id="cb94-21"><a href="#cb94-21" aria-hidden="true" tabindex="-1"></a> <span class="fu">},</span></span> | ||
<span id="cb94-22"><a href="#cb94-22" aria-hidden="true" tabindex="-1"></a> <span class="dt">"$Name"</span><span class="fu">:</span> <span class="st">"ccid"</span></span> | ||
<span id="cb94-23"><a href="#cb94-23" aria-hidden="true" tabindex="-1"></a> <span class="fu">}</span></span> | ||
<span id="cb94-24"><a href="#cb94-24" aria-hidden="true" tabindex="-1"></a> <span class="ot">]</span><span class="fu">,</span></span> | ||
<span id="cb94-25"><a href="#cb94-25" aria-hidden="true" tabindex="-1"></a> <span class="dt">"$Function"</span><span class="fu">:</span> <span class="st">"odata.fillUriTemplate"</span></span> | ||
<span id="cb94-26"><a href="#cb94-26" aria-hidden="true" tabindex="-1"></a> <span class="fu">}</span></span> | ||
<span id="cb94-27"><a href="#cb94-27" aria-hidden="true" tabindex="-1"></a> <span class="fu">}</span></span> | ||
<span id="cb94-28"><a href="#cb94-28" aria-hidden="true" tabindex="-1"></a><span class="fu">}</span></span></code></pre></div> | ||
<div class="sourceCode" id="cb94"><pre class="sourceCode json"><code class="sourceCode json"><span id="cb94-1"><a href="#cb94-1" aria-hidden="true" tabindex="-1"></a><span class="er">"$Annotations":</span> <span class="fu">{</span></span> | ||
<span id="cb94-2"><a href="#cb94-2" aria-hidden="true" tabindex="-1"></a> <span class="dt">"org.example.Person"</span><span class="fu">:</span> <span class="fu">{</span></span> | ||
<span id="cb94-3"><a href="#cb94-3" aria-hidden="true" tabindex="-1"></a> <span class="dt">"@org.example.hcm.Employee"</span><span class="fu">:</span> <span class="fu">{</span></span> | ||
<span id="cb94-4"><a href="#cb94-4" aria-hidden="true" tabindex="-1"></a> <span class="dt">"@type"</span><span class="fu">:</span> <span class="st">"https://example.org/vocabs/person#org.example.person.Manager"</span><span class="fu">,</span></span> | ||
<span id="cb94-5"><a href="#cb94-5" aria-hidden="true" tabindex="-1"></a> <span class="dt">"@Core.Description"</span><span class="fu">:</span> <span class="st">"Annotation on record"</span><span class="fu">,</span></span> | ||
<span id="cb94-6"><a href="#cb94-6" aria-hidden="true" tabindex="-1"></a> <span class="dt">"GivenName"</span><span class="fu">:</span> <span class="fu">{</span></span> | ||
<span id="cb94-7"><a href="#cb94-7" aria-hidden="true" tabindex="-1"></a> <span class="dt">"$Path"</span><span class="fu">:</span> <span class="st">"FirstName"</span></span> | ||
<span id="cb94-8"><a href="#cb94-8" aria-hidden="true" tabindex="-1"></a> <span class="fu">},</span></span> | ||
<span id="cb94-9"><a href="#cb94-9" aria-hidden="true" tabindex="-1"></a> <span class="dt">"[email protected]"</span><span class="fu">:</span> <span class="st">"Annotation on record member"</span><span class="fu">,</span></span> | ||
<span id="cb94-10"><a href="#cb94-10" aria-hidden="true" tabindex="-1"></a> <span class="dt">"Surname"</span><span class="fu">:</span> <span class="fu">{</span></span> | ||
<span id="cb94-11"><a href="#cb94-11" aria-hidden="true" tabindex="-1"></a> <span class="dt">"$Path"</span><span class="fu">:</span> <span class="st">"LastName"</span></span> | ||
<span id="cb94-12"><a href="#cb94-12" aria-hidden="true" tabindex="-1"></a> <span class="fu">},</span></span> | ||
<span id="cb94-13"><a href="#cb94-13" aria-hidden="true" tabindex="-1"></a> <span class="dt">"DirectSupervisor"</span><span class="fu">:</span> <span class="fu">{</span></span> | ||
<span id="cb94-14"><a href="#cb94-14" aria-hidden="true" tabindex="-1"></a> <span class="dt">"$Path"</span><span class="fu">:</span> <span class="st">"Manager"</span></span> | ||
<span id="cb94-15"><a href="#cb94-15" aria-hidden="true" tabindex="-1"></a> <span class="fu">},</span></span> | ||
<span id="cb94-16"><a href="#cb94-16" aria-hidden="true" tabindex="-1"></a> <span class="dt">"CostCenter"</span><span class="fu">:</span> <span class="fu">{</span></span> | ||
<span id="cb94-17"><a href="#cb94-17" aria-hidden="true" tabindex="-1"></a> <span class="dt">"$UrlRef"</span><span class="fu">:</span> <span class="fu">{</span></span> | ||
<span id="cb94-18"><a href="#cb94-18" aria-hidden="true" tabindex="-1"></a> <span class="dt">"$Apply"</span><span class="fu">:</span> <span class="ot">[</span></span> | ||
<span id="cb94-19"><a href="#cb94-19" aria-hidden="true" tabindex="-1"></a> <span class="st">"http://host/anotherservice/CostCenters('{ccid}')"</span><span class="ot">,</span></span> | ||
<span id="cb94-20"><a href="#cb94-20" aria-hidden="true" tabindex="-1"></a> <span class="fu">{</span></span> | ||
<span id="cb94-21"><a href="#cb94-21" aria-hidden="true" tabindex="-1"></a> <span class="dt">"$LabeledElement"</span><span class="fu">:</span> <span class="fu">{</span></span> | ||
<span id="cb94-22"><a href="#cb94-22" aria-hidden="true" tabindex="-1"></a> <span class="dt">"$Path"</span><span class="fu">:</span> <span class="st">"CostCenterID"</span></span> | ||
<span id="cb94-23"><a href="#cb94-23" aria-hidden="true" tabindex="-1"></a> <span class="fu">},</span></span> | ||
<span id="cb94-24"><a href="#cb94-24" aria-hidden="true" tabindex="-1"></a> <span class="dt">"$Name"</span><span class="fu">:</span> <span class="st">"ccid"</span></span> | ||
<span id="cb94-25"><a href="#cb94-25" aria-hidden="true" tabindex="-1"></a> <span class="fu">}</span></span> | ||
<span id="cb94-26"><a href="#cb94-26" aria-hidden="true" tabindex="-1"></a> <span class="ot">]</span><span class="fu">,</span></span> | ||
<span id="cb94-27"><a href="#cb94-27" aria-hidden="true" tabindex="-1"></a> <span class="dt">"$Function"</span><span class="fu">:</span> <span class="st">"odata.fillUriTemplate"</span></span> | ||
<span id="cb94-28"><a href="#cb94-28" aria-hidden="true" tabindex="-1"></a> <span class="fu">}</span></span> | ||
<span id="cb94-29"><a href="#cb94-29" aria-hidden="true" tabindex="-1"></a> <span class="fu">}</span></span> | ||
<span id="cb94-30"><a href="#cb94-30" aria-hidden="true" tabindex="-1"></a> <span class="fu">}</span></span> | ||
<span id="cb94-31"><a href="#cb94-31" aria-hidden="true" tabindex="-1"></a> <span class="fu">}</span></span> | ||
<span id="cb94-32"><a href="#cb94-32" aria-hidden="true" tabindex="-1"></a><span class="fu">}</span></span></code></pre></div> | ||
</div> | ||
<h3 id="14413-url-reference"><a name="URLReference" href="#URLReference">14.4.13 URL Reference</a></h3> | ||
<p>The URL reference expression enables a value to be obtained by sending a <code>GET</code> request.</p> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5338,31 +5338,35 @@ a structured type with two structural properties `GivenName` and | |
annotated entity type, the fourth adds a calculated navigation property | ||
that is pointing to a different service | ||
```json | ||
"@person.Employee": { | ||
"@type": "https://example.org/vocabs/person#org.example.person.Manager", | ||
"@Core.Description": "Annotation on record", | ||
"GivenName": { | ||
"$Path": "FirstName" | ||
}, | ||
"[email protected]": "Annotation on record member", | ||
"Surname": { | ||
"$Path": "LastName" | ||
}, | ||
"DirectSupervisor": { | ||
"$Path": "Manager" | ||
}, | ||
"CostCenter": { | ||
"$UrlRef": { | ||
"$Apply": [ | ||
"http://host/anotherservice/CostCenters('{ccid}')", | ||
{ | ||
"$LabeledElement": { | ||
"$Path": "CostCenterID" | ||
}, | ||
"$Name": "ccid" | ||
"$Annotations": { | ||
"org.example.Person": { | ||
"@org.example.hcm.Employee": { | ||
"@type": "https://example.org/vocabs/person#org.example.person.Manager", | ||
"@Core.Description": "Annotation on record", | ||
"GivenName": { | ||
"$Path": "FirstName" | ||
}, | ||
"[email protected]": "Annotation on record member", | ||
"Surname": { | ||
"$Path": "LastName" | ||
}, | ||
"DirectSupervisor": { | ||
"$Path": "Manager" | ||
}, | ||
"CostCenter": { | ||
"$UrlRef": { | ||
"$Apply": [ | ||
"http://host/anotherservice/CostCenters('{ccid}')", | ||
{ | ||
"$LabeledElement": { | ||
"$Path": "CostCenterID" | ||
}, | ||
"$Name": "ccid" | ||
} | ||
], | ||
"$Function": "odata.fillUriTemplate" | ||
} | ||
], | ||
"$Function": "odata.fillUriTemplate" | ||
} | ||
} | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.