Skip to content

Commit

Permalink
Move to AI vocabulary
Browse files Browse the repository at this point in the history
  • Loading branch information
HeikoTheissen committed Dec 21, 2023
1 parent 8b22fa5 commit b6685cc
Show file tree
Hide file tree
Showing 8 changed files with 178 additions and 97 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{
"$Version": "4.0",
"$Reference": {
"https://sap.github.io/odata-vocabularies/vocabularies/AI.json": {
"$Include": [{ "$Namespace": "com.sap.vocabularies.AI.v1", "$Alias": "AI" }]
},
"https://sap.github.io/odata-vocabularies/vocabularies/Common.json": {
"$Include": [{ "$Namespace": "com.sap.vocabularies.Common.v1", "$Alias": "Common" }]
}
Expand All @@ -20,9 +23,9 @@
},
"$Annotations": {
"recommendation.sample.WorkerTimeSheet/ClockInTimezone": {
"@Common[email protected]": { "$Path": "ClickInTimezone_Recommendation/text" },
"@Common.Recommendation": { "$Path": "ClickInTimezone_Recommendation/value" },
"@Common.RecommendationAlternatives": { "$Path": "ClickInTimezone_Recommendation/alternatives" }
"@AI[email protected]": { "$Path": "ClickInTimezone_Recommendation/text" },
"@AI.Recommendation": { "$Path": "ClickInTimezone_Recommendation/value" },
"@AI.RecommendationAlternatives": { "$Path": "ClickInTimezone_Recommendation/alternatives" }
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<?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://sap.github.io/odata-vocabularies/vocabularies/AI.xml">
<edmx:Include Namespace="com.sap.vocabularies.AI.v1" Alias="AI" />
</edmx:Reference>
<edmx:Reference Uri="https://sap.github.io/odata-vocabularies/vocabularies/Common.xml">
<edmx:Include Namespace="com.sap.vocabularies.Common.v1" Alias="Common" />
</edmx:Reference>
Expand All @@ -16,10 +19,10 @@
<Property Name="alternatives" Type="Collection(Edm.String)" Nullable="false" />
</ComplexType>
<Annotations Target="recommendation.sample.WorkerTimeSheet/ClockInTimezone">
<Annotation Term="Common.Recommendation" Path="ClickInTimezone_Recommendation/value">
<Annotation Term="AI.Recommendation" Path="ClickInTimezone_Recommendation/value">
<Annotation Term="Common.Text" Path="ClickInTimezone_Recommendation/text" />
</Annotation>
<Annotation Term="Common.RecommendationAlternatives" Path="ClickInTimezone_Recommendation/alternatives" />
<Annotation Term="AI.RecommendationAlternatives" Path="ClickInTimezone_Recommendation/alternatives" />
</Annotations>
</Schema>
</edmx:DataServices>
Expand Down
67 changes: 67 additions & 0 deletions vocabularies/AI.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
{
"$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/Common.json": {
"$Include": [{ "$Namespace": "com.sap.vocabularies.Common.v1", "$Alias": "Common" }]
},
"https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Validation.V1.json": {
"$Include": [{ "$Namespace": "Org.OData.Validation.V1", "$Alias": "Validation" }]
}
},
"com.sap.vocabularies.AI.v1": {
"$Alias": "AI",
"@Common.Experimental": true,
"@Core.Description": "Terms for AI-related functionality at SAP",
"@Core.Description#Published": "2023-10-04 © Copyright 2023 SAP SE. All rights reserved.",
"@Core.Links": [
{ "rel": "alternate", "href": "https://sap.github.io/odata-vocabularies/vocabularies/AI.xml" },
{ "rel": "latest-version", "href": "https://sap.github.io/odata-vocabularies/vocabularies/AI.json" },
{ "rel": "describedby", "href": "https://github.com/sap/odata-vocabularies/blob/main/vocabularies/AI.md" }
],
"Recommendation": {
"$Kind": "Term",
"$Type": "Edm.PrimitiveType",
"$AppliesTo": ["Property", "ReturnType"],
"@Common.Experimental": true,
"@Core.Description": "A recommended value for this property or in this returned value",
"@Validation.ApplicableTerms": ["Common.Text", "Common.RecommendationScore"]
},
"RecommendationScore": {
"$Kind": "Term",
"$Type": "Edm.Decimal",
"$AppliesTo": ["Property"],
"@Common.Experimental": true,
"@Core.Description": "Confidence score of a recommendation"
},
"RecommendationAlternatives": {
"$Kind": "Term",
"$Collection": true,
"$Type": "Edm.Untyped",
"$AppliesTo": ["Property", "ReturnType"],
"@Common.Experimental": true,
"@Core.Description": "Alternative recommended values for this property or in this returned value",
"@Validation.DerivedTypeConstraint": [
"Edm.Binary",
"Edm.Boolean",
"Edm.Byte",
"Edm.Date",
"Edm.DateTimeOffset",
"Edm.Decimal",
"Edm.Double",
"Edm.Duration",
"Edm.Guid",
"Edm.Int16",
"Edm.Int32",
"Edm.Int64",
"Edm.SByte",
"Edm.Single",
"Edm.String",
"Edm.TimeOfDay"
],
"@Validation.ApplicableTerms": ["Common.Text", "Common.RecommendationScore"]
}
}
}
13 changes: 13 additions & 0 deletions vocabularies/AI.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# AI Vocabulary
**Namespace: [com.sap.vocabularies.AI.v1](AI.xml)**

Terms for AI-related functionality at SAP


## Terms

Term|Type|Description
:---|:---|:----------
[Recommendation](./AI.xml#L38:~:text=<Term%20Name="-,Recommendation,-") *([Experimental](Common.md#Experimental))*|PrimitiveType|<a name="Recommendation"></a>A recommended value for this property or in this returned value<br>Can be annotated with:<br>- [Text](Common.md#Text)<br>- [RecommendationScore](Common.md#RecommendationScore)
[RecommendationScore](./AI.xml#L48:~:text=<Term%20Name="-,RecommendationScore,-") *([Experimental](Common.md#Experimental))*|Decimal|<a name="RecommendationScore"></a>Confidence score of a recommendation
[RecommendationAlternatives](./AI.xml#L52:~:text=<Term%20Name="-,RecommendationAlternatives,-") *([Experimental](Common.md#Experimental))*|\[Untyped\]|<a name="RecommendationAlternatives"></a>Alternative recommended values for this property or in this returned value<br>Can be annotated with:<br>- [Text](Common.md#Text)<br>- [RecommendationScore](Common.md#RecommendationScore)
85 changes: 85 additions & 0 deletions vocabularies/AI.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
<?xml version="1.0" encoding="utf-8"?>
<edmx:Edmx xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx" Version="4.0">
<edmx:Reference Uri="https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Core.V1.xml">
<edmx:Include Alias="Core" Namespace="Org.OData.Core.V1" />
</edmx:Reference>
<edmx:Reference Uri="https://sap.github.io/odata-vocabularies/vocabularies/Common.xml">
<edmx:Include Namespace="com.sap.vocabularies.Common.v1" Alias="Common" />
</edmx:Reference>
<edmx:Reference Uri="https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Validation.V1.xml">
<edmx:Include Alias="Validation" Namespace="Org.OData.Validation.V1" />
</edmx:Reference>
<edmx:DataServices>
<Schema xmlns="http://docs.oasis-open.org/odata/ns/edm" Namespace="com.sap.vocabularies.AI.v1" Alias="AI">
<Annotation Term="Common.Experimental" />
<Annotation Term="Core.Description">
<String>Terms for AI-related functionality at SAP</String>
</Annotation>
<Annotation Term="Core.Description" Qualifier="Published">
<String>2023-10-04 © Copyright 2023 SAP SE. All rights reserved.</String>
</Annotation>
<Annotation Term="Core.Links">
<Collection>
<Record>
<PropertyValue Property="rel" String="latest-version" />
<PropertyValue Property="href" String="https://sap.github.io/odata-vocabularies/vocabularies/AI.xml" />
</Record>
<Record>
<PropertyValue Property="rel" String="alternate" />
<PropertyValue Property="href" String="https://sap.github.io/odata-vocabularies/vocabularies/AI.json" />
</Record>
<Record>
<PropertyValue Property="rel" String="describedby" />
<PropertyValue Property="href" String="https://github.com/sap/odata-vocabularies/blob/main/vocabularies/AI.md" />
</Record>
</Collection>
</Annotation>

<Term Name="Recommendation" Type="Edm.PrimitiveType" Nullable="false" AppliesTo="Property ReturnType">
<Annotation Term="Common.Experimental" />
<Annotation Term="Core.Description" String="A recommended value for this property or in this returned value" />
<Annotation Term="Validation.ApplicableTerms">
<Collection>
<String>Common.Text</String>
<String>Common.RecommendationScore</String>
</Collection>
</Annotation>
</Term>
<Term Name="RecommendationScore" Type="Edm.Decimal" Scale="variable" Nullable="false" AppliesTo="Property">
<Annotation Term="Common.Experimental" />
<Annotation Term="Core.Description" String="Confidence score of a recommendation" />
</Term>
<Term Name="RecommendationAlternatives" Type="Collection(Edm.Untyped)" Nullable="false" AppliesTo="Property ReturnType">
<Annotation Term="Common.Experimental" />
<Annotation Term="Core.Description" String="Alternative recommended values for this property or in this returned value" />
<Annotation Term="Validation.DerivedTypeConstraint">
<Collection>
<String>Edm.Binary</String>
<String>Edm.Boolean</String>
<String>Edm.Byte</String>
<String>Edm.Date</String>
<String>Edm.DateTimeOffset</String>
<String>Edm.Decimal</String>
<String>Edm.Double</String>
<String>Edm.Duration</String>
<String>Edm.Guid</String>
<String>Edm.Int16</String>
<String>Edm.Int32</String>
<String>Edm.Int64</String>
<String>Edm.SByte</String>
<String>Edm.Single</String>
<String>Edm.String</String>
<String>Edm.TimeOfDay</String>
</Collection>
</Annotation>
<Annotation Term="Validation.ApplicableTerms">
<Collection>
<String>Common.Text</String>
<String>Common.RecommendationScore</String>
</Collection>
</Annotation>
</Term>

</Schema>
</edmx:DataServices>
</edmx:Edmx>
44 changes: 1 addition & 43 deletions vocabularies/Common.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$Version": "4.01",
"$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" }]
Expand Down Expand Up @@ -1288,48 +1288,6 @@
"@Common.Experimental": true,
"@Core.IsURL": true,
"@Core.Description": "Base URL for WebSocket connections"
},
"Recommendation": {
"$Kind": "Term",
"$Type": "Edm.PrimitiveType",
"$AppliesTo": ["Property", "ReturnType"],
"@Common.Experimental": true,
"@Core.Description": "A recommended value for this property or in this returned value",
"@Validation.ApplicableTerms": ["Common.Text", "Common.RecommendationScore"]
},
"RecommendationScore": {
"$Kind": "Term",
"$Type": "Edm.Decimal",
"$AppliesTo": ["Property"],
"@Common.Experimental": true,
"@Core.Description": "Confidence score of a recommendation"
},
"RecommendationAlternatives": {
"$Kind": "Term",
"$Collection": true,
"$Type": "Edm.Untyped",
"$AppliesTo": ["Property", "ReturnType"],
"@Common.Experimental": true,
"@Core.Description": "Alternative recommended values for this property or in this returned value",
"@Validation.DerivedTypeConstraint": [
"Edm.Binary",
"Edm.Boolean",
"Edm.Byte",
"Edm.Date",
"Edm.DateTimeOffset",
"Edm.Decimal",
"Edm.Double",
"Edm.Duration",
"Edm.Guid",
"Edm.Int16",
"Edm.Int32",
"Edm.Int64",
"Edm.SByte",
"Edm.Single",
"Edm.String",
"Edm.TimeOfDay"
],
"@Validation.ApplicableTerms": ["Common.Text", "Common.RecommendationScore"]
}
}
}
3 changes: 0 additions & 3 deletions vocabularies/Common.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,6 @@ Term|Type|Description
[mediaUploadLink](./Common.xml#L1427:~:text=<Term%20Name="-,mediaUploadLink,-") *([Experimental](Common.md#Experimental))*|URL|<a name="mediaUploadLink"></a>URL for uploading new media content to a Document Management Service<br>In contrast to the `@odata.mediaEditLink` this URL allows to upload new media content without directly changing a stream property or media resource. The upload request typically uses HTTP POST with `Content-Type: multipart/form-data` following RFC 7578. The upload request must contain one multipart representing the content of the file. The `name` parameter in the `Content-Disposition` header (as described in RFC 7578) is irrelevant, but the `filename` parameter is expected. If the request succeeds the response will contain a JSON body of `Content-Type: application/json` with a JSON property `readLink`. The newly uploaded media resource can be linked to the stream property by changing the `@odata.mediaReadLink` to the value of this `readLink` in a subsequent PATCH request to the OData entity.
[PrimitivePropertyPath](./Common.xml#L1442:~:text=<Term%20Name="-,PrimitivePropertyPath,-") *([Experimental](Common.md#Experimental))*|[Tag](https://github.com/oasis-tcs/odata-vocabularies/blob/main/vocabularies/Org.OData.Core.V1.md#Tag)|<a name="PrimitivePropertyPath"></a>A term or term property with this tag whose type is (a collection of) `Edm.PropertyPath` MUST resolve to a primitive structural property
[WebSocketBaseURL](./Common.xml#L1447:~:text=<Term%20Name="-,WebSocketBaseURL,-") *([Experimental](Common.md#Experimental))*|URL|<a name="WebSocketBaseURL"></a>Base URL for WebSocket connections
[Recommendation](./Common.xml#L1453:~:text=<Term%20Name="-,Recommendation,-") *([Experimental](Common.md#Experimental))*|PrimitiveType|<a name="Recommendation"></a>A recommended value for this property or in this returned value<br>Can be annotated with:<br>- [Text](#Text)<br>- [RecommendationScore](#RecommendationScore)
[RecommendationScore](./Common.xml#L1463:~:text=<Term%20Name="-,RecommendationScore,-") *([Experimental](Common.md#Experimental))*|Decimal|<a name="RecommendationScore"></a>Confidence score of a recommendation
[RecommendationAlternatives](./Common.xml#L1467:~:text=<Term%20Name="-,RecommendationAlternatives,-") *([Experimental](Common.md#Experimental))*|\[Untyped\]|<a name="RecommendationAlternatives"></a>Alternative recommended values for this property or in this returned value<br>Can be annotated with:<br>- [Text](#Text)<br>- [RecommendationScore](#RecommendationScore)

<a name="TextFormatType"></a>
## [TextFormatType](./Common.xml#L116:~:text=<EnumType%20Name="-,TextFormatType,-")
Expand Down
47 changes: 1 addition & 46 deletions vocabularies/Common.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<edmx:Edmx xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx" Version="4.01">
<edmx:Edmx xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx" Version="4.0">
<edmx:Reference Uri="https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Core.V1.xml">
<edmx:Include Alias="Core" Namespace="Org.OData.Core.V1" />
</edmx:Reference>
Expand Down Expand Up @@ -1450,51 +1450,6 @@ If the request succeeds the response will contain a JSON body of `Content-Type:
<Annotation Term="Core.Description" String="Base URL for WebSocket connections" />
</Term>

<Term Name="Recommendation" Type="Edm.PrimitiveType" Nullable="false" AppliesTo="Property ReturnType">
<Annotation Term="Common.Experimental" />
<Annotation Term="Core.Description" String="A recommended value for this property or in this returned value" />
<Annotation Term="Validation.ApplicableTerms">
<Collection>
<String>Common.Text</String>
<String>Common.RecommendationScore</String>
</Collection>
</Annotation>
</Term>
<Term Name="RecommendationScore" Type="Edm.Decimal" Scale="variable" Nullable="false" AppliesTo="Property">
<Annotation Term="Common.Experimental" />
<Annotation Term="Core.Description" String="Confidence score of a recommendation" />
</Term>
<Term Name="RecommendationAlternatives" Type="Collection(Edm.Untyped)" Nullable="false" AppliesTo="Property ReturnType">
<Annotation Term="Common.Experimental" />
<Annotation Term="Core.Description" String="Alternative recommended values for this property or in this returned value" />
<Annotation Term="Validation.DerivedTypeConstraint">
<Collection>
<String>Edm.Binary</String>
<String>Edm.Boolean</String>
<String>Edm.Byte</String>
<String>Edm.Date</String>
<String>Edm.DateTimeOffset</String>
<String>Edm.Decimal</String>
<String>Edm.Double</String>
<String>Edm.Duration</String>
<String>Edm.Guid</String>
<String>Edm.Int16</String>
<String>Edm.Int32</String>
<String>Edm.Int64</String>
<String>Edm.SByte</String>
<String>Edm.Single</String>
<String>Edm.String</String>
<String>Edm.TimeOfDay</String>
</Collection>
</Annotation>
<Annotation Term="Validation.ApplicableTerms">
<Collection>
<String>Common.Text</String>
<String>Common.RecommendationScore</String>
</Collection>
</Annotation>
</Term>

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

0 comments on commit b6685cc

Please sign in to comment.