Skip to content

Commit

Permalink
Merge branch 'main' into ODATA-1253-2
Browse files Browse the repository at this point in the history
  • Loading branch information
ralfhandl authored Feb 29, 2024
2 parents 2b5dcee + 1b596f3 commit aa14246
Show file tree
Hide file tree
Showing 25 changed files with 1,745 additions and 580 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:

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

steps:
- uses: actions/checkout@v3
Expand Down
13 changes: 11 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,18 @@
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[xml]": {
"editor.defaultFormatter": "redhat.vscode-xml",
"editor.defaultFormatter": "redhat.vscode-xml"
},
"files.insertFinalNewline": true,
"files.trimFinalNewlines": true,
"cSpell.words": ["depr", "emph", "qname", "rarr", "vola"]
"cSpell.words": [
"CSDL",
"depr",
"emph",
"OData",
"positionals",
"qname",
"rarr",
"vola"
]
}
310 changes: 310 additions & 0 deletions examples/Org.OData.Aggregation.V1.SalesModel-sample.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,310 @@
{
"$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://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Aggregation.V1.json": {
"$Include": [
{
"$Namespace": "Org.OData.Aggregation.V1",
"$Alias": "Aggregation"
}
]
}
},
"org.example.odata.salesservice": {
"$Alias": "SalesModel",
"Currency": {
"$Kind": "EntityType",
"$Key": [
"Code"
],
"Code": {
"$Nullable": true
},
"Name": {
"$Nullable": true,
"@Core.IsLanguageDependent": true
}
},
"Time": {
"$Kind": "EntityType",
"$Key": [
"Date"
],
"Date": {
"$Type": "Edm.Date"
},
"Month": {},
"Quarter": {},
"Year": {
"$Type": "Edm.Int16"
},
"@Aggregation.LeveledHierarchy#TimeHierarchy": [
"Year",
"Quarter",
"Month"
]
},
"Category": {
"$Kind": "EntityType",
"$Key": [
"ID"
],
"ID": {},
"Name": {
"$Nullable": true
},
"Products": {
"$Kind": "NavigationProperty",
"$Collection": true,
"$Type": "SalesModel.Product",
"$Partner": "Category"
}
},
"SalesOrganization": {
"$Kind": "EntityType",
"$Key": [
"ID"
],
"ID": {},
"Name": {
"$Nullable": true
},
"Superordinate": {
"$Kind": "NavigationProperty",
"$Type": "SalesModel.SalesOrganization",
"$Nullable": true
},
"Sales": {
"$Kind": "NavigationProperty",
"$Collection": true,
"$Type": "SalesModel.Sale",
"$Partner": "SalesOrganization"
},
"@Aggregation.RecursiveHierarchy#SalesOrgHierarchy": {
"NodeProperty": "ID",
"ParentNavigationProperty": "Superordinate"
}
},
"Customer": {
"$Kind": "EntityType",
"$Key": [
"ID"
],
"ID": {},
"Name": {
"$Nullable": true
},
"Country": {
"$Nullable": true
},
"Sales": {
"$Kind": "NavigationProperty",
"$Collection": true,
"$Type": "SalesModel.Sale",
"$Partner": "Customer"
}
},
"Product": {
"$Kind": "EntityType",
"$Abstract": true,
"$Key": [
"ID"
],
"ID": {},
"Name": {
"$Nullable": true
},
"Color": {
"$Nullable": true
},
"TaxRate": {
"$Type": "Edm.Decimal",
"$Nullable": true,
"$Scale": 2
},
"Category": {
"$Kind": "NavigationProperty",
"$Type": "SalesModel.Category",
"$Partner": "Products"
},
"Sales": {
"$Kind": "NavigationProperty",
"$Collection": true,
"$Type": "SalesModel.Sale",
"$Partner": "Product"
},
"@Aggregation.LeveledHierarchy#ProductHierarchy": [
"Category/Name",
"Name"
]
},
"FoodProduct": {
"$Kind": "EntityType",
"$BaseType": "SalesModel.Product",
"Rating": {
"$Type": "Edm.Byte",
"$Nullable": true
}
},
"NonFoodProduct": {
"$Kind": "EntityType",
"$BaseType": "SalesModel.Product",
"RatingClass": {
"$Nullable": true
}
},
"Sale": {
"$Kind": "EntityType",
"$Key": [
"ID"
],
"ID": {},
"Amount": {
"$Type": "Edm.Decimal",
"$Nullable": true,
"$Scale": 2,
"@Aggregation.ContextDefiningProperties": [
"Currency/Code"
]
},
"Currency": {
"$Kind": "NavigationProperty",
"$Type": "SalesModel.Currency"
},
"SalesOrganization": {
"$Kind": "NavigationProperty",
"$Type": "SalesModel.SalesOrganization",
"$Nullable": true,
"$Partner": "Sales"
},
"Product": {
"$Kind": "NavigationProperty",
"$Type": "SalesModel.Product",
"$Nullable": true,
"$Partner": "Sales"
},
"Customer": {
"$Kind": "NavigationProperty",
"$Type": "SalesModel.Customer",
"$Nullable": true,
"$Partner": "Sales"
},
"Time": {
"$Kind": "NavigationProperty",
"$Type": "SalesModel.Time",
"$Nullable": true
}
},
"SalesData": {
"$Kind": "EntityContainer",
"Time": {
"$Collection": true,
"$Type": "SalesModel.Time"
},
"Categories": {
"$Collection": true,
"$Type": "SalesModel.Category",
"$NavigationPropertyBinding": {
"Products": "Products"
}
},
"SalesOrganizations": {
"$Collection": true,
"$Type": "SalesModel.SalesOrganization",
"$NavigationPropertyBinding": {
"Superordinate": "SalesOrganizations",
"Sales": "Sales"
}
},
"Customers": {
"$Collection": true,
"$Type": "SalesModel.Customer",
"$NavigationPropertyBinding": {
"Sales": "Sales"
}
},
"Products": {
"$Collection": true,
"$Type": "SalesModel.Product",
"$NavigationPropertyBinding": {
"Category": "Categories",
"Sales": "Sales"
}
},
"Sales": {
"$Collection": true,
"$Type": "SalesModel.Sale",
"$NavigationPropertyBinding": {
"SalesOrganization": "SalesOrganizations",
"Customer": "Customers",
"Product": "Products",
"Time": "Time"
}
}
},
"$Annotations": {
"SalesModel.SalesData/Sales": {
"@Aggregation.ApplySupported": {
"Rollup": "MultipleHierarchies",
"GroupableProperties": [
"Amount",
"Product/ID",
"Product/Name",
"Product/Category/ID",
"Product/Category/Name",
"Customer",
"Customer/ID",
"Customer/Name",
"Customer/Country",
"Time",
"Time/Month",
"Time/Year"
],
"AggregatableProperties": [
{
"Property": "Amount",
"SupportedAggregationMethods": [
"sum",
"min",
"max"
],
"RecommendedAggregationMethod": "sum"
}
]
},
"@Aggregation.CustomAggregate#[email protected]": [
"Currency/Code"
],
"@Aggregation.CustomAggregate#Forecast": "Edm.Decimal"
},
"SalesModel.SalesData/Customers": {
"@Aggregation.ApplySupported": {
"Rollup": "None",
"GroupableProperties": [
"Name",
"Country"
]
}
},
"SalesModel.SalesData/Products": {
"@Aggregation.ApplySupported": {
"Rollup": "None",
"GroupableProperties": [
"Name",
"SalesModel.FoodProduct/Rating",
"SalesModel.NonFoodProduct/RatingClass"
]
}
}
}
},
"$EntityContainer": "org.example.odata.salesservice.SalesData"
}
Loading

0 comments on commit aa14246

Please sign in to comment.