Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into UI.UserInteraction
Browse files Browse the repository at this point in the history
  • Loading branch information
HeikoTheissen committed Dec 12, 2023
2 parents 103b85c + 6f0c062 commit b2f5854
Show file tree
Hide file tree
Showing 28 changed files with 1,898 additions and 871 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:

strategy:
matrix:
node-version: [18.x]
node-version: [20.x]

steps:
- uses: actions/checkout@v3
Expand All @@ -25,7 +25,7 @@ jobs:
git config user.name ${GITHUB_ACTOR}
git config user.email ${PUSHER_EMAIL}
git add vocabularies/*.md vocabularies/*.json examples/*.json
git diff-index --quiet HEAD || git commit -m "auto-refreshed"
git diff-index --quiet HEAD vocabularies/*.md vocabularies/*.json examples/*.json || git commit -m "auto-refreshed"
git push
env:
CI: true
Expand Down
50 changes: 50 additions & 0 deletions examples/Common.ExternalId-samples.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"$Version": "4.0",
"$Reference": {
"https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Core.V1.json": {
"$Include": [{ "$Namespace": "Org.OData.Core.V1", "$Alias": "Core" }]
},
"https://sap.github.io/odata-vocabularies/vocabularies/UI.json": {
"$Include": [{ "$Namespace": "com.sap.vocabularies.Common.v1", "$Alias": "Common" }]
}
},
"ExternalId.examples": {
"$Alias": "this",
"container": {
"$Kind": "EntityContainer",
"SalesOrder": { "$Collection": true, "$Type": "this.SalesOrder_Type" },
"PurchaseOrder": { "$Collection": true, "$Type": "this.PurchaseOrder_Type" }
},
"SalesOrder_Type": {
"$Kind": "EntityType",
"$Key": ["SalesOrder"],
"SalesOrder": { "$MaxLength": 10 },
"PurchaseOrderId": { "$Type": "Edm.Guid", "$Nullable": true },
"to_PurchaseOrder": { "$Kind": "NavigationProperty", "$Collection": true, "$Type": "this.PurchaseOrder_Type" }
},
"PurchaseOrder_Type": {
"$Kind": "EntityType",
"$Key": ["PurchaseOrderId"],
"PurchaseOrderId": { "$Type": "Edm.Guid" },
"PurchaseOrder": { "$Nullable": true, "$MaxLength": 10 }
},
"ChangePOReference": [
{
"$Kind": "Action",
"$IsBound": true,
"$Parameter": [
{ "$Name": "it", "$Type": "this.SalesOrder_Type" },
{ "$Name": "PurchaseOrderId", "$Type": "Edm.Guid", "$Nullable": true }
],
"$ReturnType": { "$Type": "this.SalesOrder_Type", "$Nullable": true }
}
],
"$Annotations": {
"this.PurchaseOrder_Type/PurchaseOrderId": { "@Common.ExternalId": { "$Path": "PurchaseOrder" } },
"this.ChangePOReference/PurchaseOrderId": {
"@Common.ExternalId": { "$Path": "it/to_PurchaseOrder/PurchaseOrder" }
}
}
},
"$EntityContainer": "ExternalId.examples.container"
}
56 changes: 56 additions & 0 deletions examples/Common.ExternalId-samples.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<?xml version="1.0" encoding="utf-8"?>
<edmx:Edmx Version="4.0" xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx">
<edmx:Reference Uri="https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Core.V1.xml">
<edmx:Include Namespace="Org.OData.Core.V1" Alias="Core" />
</edmx:Reference>

<edmx:Reference Uri="https://sap.github.io/odata-vocabularies/vocabularies/UI.xml">
<edmx:Include Namespace="com.sap.vocabularies.Common.v1" Alias="Common" />
</edmx:Reference>

<edmx:DataServices>
<Schema Namespace="ExternalId.examples" xmlns="http://docs.oasis-open.org/odata/ns/edm" Alias="this">

<EntityContainer Name="container">
<EntitySet Name="SalesOrder" EntityType="this.SalesOrder_Type" />
<EntitySet Name="PurchaseOrder" EntityType="this.PurchaseOrder_Type" />
</EntityContainer>

<EntityType Name="SalesOrder_Type">
<Key>
<PropertyRef Name="SalesOrder" />
</Key>
<Property Name="SalesOrder" Type="Edm.String" Nullable="false" MaxLength="10" />
<Property Name="PurchaseOrderId" Type="Edm.Guid" Nullable="true" />
<NavigationProperty Name="to_PurchaseOrder" Type="Collection(this.PurchaseOrder_Type)" />
<!-- ... and a lot more -->
</EntityType>

<EntityType Name="PurchaseOrder_Type">
<Key>
<PropertyRef Name="PurchaseOrderId" />
</Key>
<Property Name="PurchaseOrderId" Type="Edm.Guid" Nullable="false" />
<Property Name="PurchaseOrder" Type="Edm.String" Nullable="true" MaxLength="10" />
<!-- ... and a lot more -->
</EntityType>

<Action Name="ChangePOReference" IsBound="true">
<Parameter Name="it" Type="this.SalesOrder_Type" Nullable="false" />
<Parameter Name="PurchaseOrderId" Type="Edm.Guid" />
<ReturnType Type="this.SalesOrder_Type"></ReturnType>
</Action>

<!-- External Id for the property PurchaseOrderId of PurchaseOrder_Type -->
<Annotations Target="this.PurchaseOrder_Type/PurchaseOrderId">
<Annotation Term="Common.ExternalId" Path="PurchaseOrder" />
</Annotations>

<!-- External Id for the parameter PurchaseOrderId on the action ChangePOReference -->
<Annotations Target="this.ChangePOReference/PurchaseOrderId">
<Annotation Term="Common.ExternalId" Path="it/to_PurchaseOrder/PurchaseOrder" />
</Annotations>

</Schema>
</edmx:DataServices>
</edmx:Edmx>
31 changes: 31 additions & 0 deletions examples/HTML5.LinkTarget-sample.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"$Version": "4.0",
"$Reference": {
"/sap/opu/odata4/sap/example/srvd/sap/example/0001/$metadata": {
"$Include": [{ "$Namespace": "com.sap.gateway.srvd.example.v0001", "$Alias": "service" }]
},
"https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Core.V1.json": {
"$Include": [{ "$Namespace": "Org.OData.Core.V1", "$Alias": "Core" }]
},
"https://sap.github.io/odata-vocabularies/vocabularies/HTML5.json": {
"$Include": [{ "$Namespace": "com.sap.vocabularies.HTML5.v1", "$Alias": "HTML5" }]
},
"https://sap.github.io/odata-vocabularies/vocabularies/UI.json": {
"$Include": [{ "$Namespace": "com.sap.vocabularies.UI.v1", "$Alias": "UI" }]
}
},
"HTML5.examples": {
"$Annotations": {
"service.DemoType": {
"@UI.LineItem": [
{
"@odata.type": "https://sap.github.io/odata-vocabularies/vocabularies/UI.xml#UI.DataFieldWithUrl",
"Value": { "$Path": "url" },
"[email protected]": "_blank",
"Url": { "$Path": "url" }
}
]
}
}
}
}
33 changes: 33 additions & 0 deletions examples/HTML5.LinkTarget-sample.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<edmx:Edmx Version="4.0" xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx">
<edmx:Reference Uri="/sap/opu/odata4/sap/example/srvd/sap/example/0001/$metadata">
<edmx:Include Namespace="com.sap.gateway.srvd.example.v0001" Alias="service" />
</edmx:Reference>
<edmx:Reference Uri="https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Core.V1.xml">
<edmx:Include Namespace="Org.OData.Core.V1" Alias="Core" />
</edmx:Reference>
<edmx:Reference Uri="https://sap.github.io/odata-vocabularies/vocabularies/HTML5.xml">
<edmx:Include Namespace="com.sap.vocabularies.HTML5.v1" Alias="HTML5" />
</edmx:Reference>
<edmx:Reference Uri="https://sap.github.io/odata-vocabularies/vocabularies/UI.xml">
<edmx:Include Namespace="com.sap.vocabularies.UI.v1" Alias="UI" />
</edmx:Reference>
<edmx:DataServices>
<Schema Namespace="HTML5.examples" xmlns="http://docs.oasis-open.org/odata/ns/edm">

<Annotations Target="service.DemoType">
<Annotation Term="UI.LineItem">
<Collection>
<Record Type="UI.DataFieldWithUrl">
<PropertyValue Property="Value" Path="url" />
<PropertyValue Property="Url" Path="url">
<Annotation Term="HTML5.LinkTarget" String="_blank" />
</PropertyValue>
</Record>
</Collection>
</Annotation>
</Annotations>

</Schema>
</edmx:DataServices>
</edmx:Edmx>
Loading

0 comments on commit b2f5854

Please sign in to comment.