diff --git a/docs/odata-csdl-json/odata-csdl-json.html b/docs/odata-csdl-json/odata-csdl-json.html index ad3eaa72b..38ced93c3 100644 --- a/docs/odata-csdl-json/odata-csdl-json.html +++ b/docs/odata-csdl-json/odata-csdl-json.html @@ -3201,34 +3201,38 @@
Example 87: this annotation “morphs” the entity type from example 13 into a structured type with two structural properties GivenName
and Surname
and two navigation properties DirectSupervisor
and CostCenter
. 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
"@person.Employee": {
-"@type": "https://example.org/vocabs/person#org.example.person.Manager",
- "@Core.Description": "Annotation on record",
- "GivenName": {
- "$Path": "FirstName"
- },
- "GivenName@Core.Description": "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"
- }
- }
- }
"$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"
+ },
+ "GivenName@Core.Description": "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"
+ }
+ }
+ }
+ }
+ }
The URL reference expression enables a value to be obtained by sending a GET
request.
Example 87: this annotation “morphs” the entity type from example 13 into a structured type with two structural properties GivenName
and Surname
and two navigation properties DirectSupervisor
and CostCenter
. 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
Annotation Term="org.example.person.Employee">
- <Record>
- <Annotation Term="Core.Description" String="Annotation on record" />
- <PropertyValue Property="GivenName" Path="FirstName">
- <Annotation Term="Core.Description"
- < String="Annotation on record member" />
-PropertyValue>
- </PropertyValue Property="Surname" Path="LastName" />
- <PropertyValue Property="DirectSupervisor" Path="Manager" />
- <PropertyValue Property="CostCenter">
- <UrlRef>
- <Apply Function="odata.fillUriTemplate">
- <String>http://host/anotherservice/CostCenters('{ccid}')</String>
- <LabeledElement Name="ccid" Path="CostCenterID" />
- <Apply>
- </UrlRef>
- </PropertyValue>
- </Record>
- </Annotation> </
Annotations Target="org.example.Person">
+ <Annotation Term="org.example.hcm.Employee">
+ <Record Type="org.example.hcm.Manager">
+ <Annotation Term="Core.Description" String="Annotation on record" />
+ <PropertyValue Property="GivenName" Path="FirstName">
+ <Annotation Term="Core.Description"
+ < String="Annotation on record member" />
+PropertyValue>
+ </PropertyValue Property="Surname" Path="LastName" />
+ <PropertyValue Property="DirectSupervisor" Path="Manager" />
+ <PropertyValue Property="CostCenter">
+ <UrlRef>
+ <Apply Function="odata.fillUriTemplate">
+ <String>http://host/anotherservice/CostCenters('{ccid}')</String>
+ <LabeledElement Name="ccid" Path="CostCenterID" />
+ <Apply>
+ </UrlRef>
+ </PropertyValue>
+ </Record>
+ </Annotation>
+ </Annotations> </
The URL reference expression enables a value to be obtained by sending a GET
request.