From 6be2f0b0267f787cdc6b8660d7d3dd47888f55a0 Mon Sep 17 00:00:00 2001 From: D024504 Date: Mon, 31 Jul 2023 10:40:50 +0200 Subject: [PATCH] ODATA-1397 --- docs/odata-csdl-json/odata-csdl-json.html | 60 +++++++------- docs/odata-csdl-json/odata-csdl-json.md | 52 ++++++------ docs/odata-csdl-xml/odata-csdl-xml.html | 40 +++++----- docs/odata-csdl-xml/odata-csdl-xml.md | 40 +++++----- odata-csdl/14 Vocabulary and Annotation.md | 92 ++++++++++++---------- 5 files changed, 151 insertions(+), 133 deletions(-) diff --git a/docs/odata-csdl-json/odata-csdl-json.html b/docs/odata-csdl-json/odata-csdl-json.html index dd6c22e4c..c05891799 100644 --- a/docs/odata-csdl-json/odata-csdl-json.html +++ b/docs/odata-csdl-json/odata-csdl-json.html @@ -3088,34 +3088,38 @@

14.4.12 Record

Example 86: this annotation "morphs" the entity type from example 8 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"
+        }
+      }
+    }
+  }
+}

14.4.13 URL Reference

The URL reference expression enables a value to be obtained by sending a GET request.

diff --git a/docs/odata-csdl-json/odata-csdl-json.md b/docs/odata-csdl-json/odata-csdl-json.md index 77cc71f29..19035cf2d 100644 --- a/docs/odata-csdl-json/odata-csdl-json.md +++ b/docs/odata-csdl-json/odata-csdl-json.md @@ -5321,31 +5321,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" - }, - "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" +"$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" } - ], - "$Function": "odata.fillUriTemplate" + } } } } diff --git a/docs/odata-csdl-xml/odata-csdl-xml.html b/docs/odata-csdl-xml/odata-csdl-xml.html index 17b75a4ed..20ba71988 100644 --- a/docs/odata-csdl-xml/odata-csdl-xml.html +++ b/docs/odata-csdl-xml/odata-csdl-xml.html @@ -2879,25 +2879,27 @@

Example 86: this annotation "morphs" the entity type from example 8 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>

14.4.13 URL Reference

The URL reference expression enables a value to be obtained by sending a GET request.

diff --git a/docs/odata-csdl-xml/odata-csdl-xml.md b/docs/odata-csdl-xml/odata-csdl-xml.md index f7f703d90..b3fa8266f 100644 --- a/docs/odata-csdl-xml/odata-csdl-xml.md +++ b/docs/odata-csdl-xml/odata-csdl-xml.md @@ -5158,25 +5158,27 @@ 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 ```xml - - - - - - - - - - - - http://host/anotherservice/CostCenters('{ccid}') - - - - - - + + + + + + + + + + + + + http://host/anotherservice/CostCenters('{ccid}') + + + + + + + ``` ::: diff --git a/odata-csdl/14 Vocabulary and Annotation.md b/odata-csdl/14 Vocabulary and Annotation.md index 831772cea..2291625cd 100644 --- a/odata-csdl/14 Vocabulary and Annotation.md +++ b/odata-csdl/14 Vocabulary and Annotation.md @@ -2791,31 +2791,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" - }, - "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" +"$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" } - ], - "$Function": "odata.fillUriTemplate" + } } } } @@ -2856,25 +2860,27 @@ 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 ```xml - - - - - - - - - - - - http://host/anotherservice/CostCenters('{ccid}') - - - - - - + + + + + + + + + + + + + http://host/anotherservice/CostCenters('{ccid}') + + + + + + + ``` :::