Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions __tests__/integration/__snapshots__/basic-auth.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ exports[`ORD Integration Tests - Basic Authentication ORD Document Endpoint Test
"visibility": "public",
},
],
"openResourceDiscovery": "1.14",
"openResourceDiscovery": "1.16",
"packages": [
{
"description": "This package contains public General for capire ord integration test.",
Expand Down Expand Up @@ -477,7 +477,7 @@ exports[`ORD Integration Tests - Basic Authentication ORD Document Endpoint Test
"visibility": "public",
},
],
"openResourceDiscovery": "1.14",
"openResourceDiscovery": "1.16",
"packages": [
{
"description": "This package contains public General for capire ord integration test.",
Expand Down Expand Up @@ -709,7 +709,7 @@ exports[`ORD Integration Tests - Basic Authentication ORD Document Endpoint Test
"visibility": "public",
},
],
"openResourceDiscovery": "1.14",
"openResourceDiscovery": "1.16",
"packages": [
{
"description": "This package contains public General for capire ord integration test.",
Expand Down Expand Up @@ -944,7 +944,7 @@ exports[`ORD Integration Tests - Basic Authentication ORD Document Endpoint Test
"visibility": "public",
},
],
"openResourceDiscovery": "1.14",
"openResourceDiscovery": "1.16",
"packages": [
{
"description": "This package contains public General for capire ord integration test.",
Expand Down Expand Up @@ -1176,7 +1176,7 @@ exports[`ORD Integration Tests - Basic Authentication ORD Document Structure Val
"visibility": "public",
},
],
"openResourceDiscovery": "1.14",
"openResourceDiscovery": "1.16",
"packages": [
{
"description": "This package contains public General for capire ord integration test.",
Expand Down Expand Up @@ -1411,7 +1411,7 @@ exports[`ORD Integration Tests - Basic Authentication ORD Document Structure Val
"visibility": "public",
},
],
"openResourceDiscovery": "1.14",
"openResourceDiscovery": "1.16",
"packages": [
{
"description": "This package contains public General for capire ord integration test.",
Expand Down
6 changes: 3 additions & 3 deletions __tests__/integration/__snapshots__/cds-build.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ exports[`ORD Build Integration Tests IntegrationDependency with cdsrc customizat
"visibility": "internal",
},
],
"openResourceDiscovery": "1.14",
"openResourceDiscovery": "1.16",
"packages": [
{
"description": "This package contains public General for capire ord integration test.",
Expand Down Expand Up @@ -443,7 +443,7 @@ exports[`ORD Build Integration Tests IntegrationDependency with custom.ord.json
"visibility": "public",
},
],
"openResourceDiscovery": "1.14",
"openResourceDiscovery": "1.16",
"packages": [
{
"description": "This package contains public General for capire ord integration test.",
Expand Down Expand Up @@ -678,7 +678,7 @@ exports[`ORD Build Integration Tests Successful Build should generate ord-docume
"visibility": "public",
},
],
"openResourceDiscovery": "1.14",
"openResourceDiscovery": "1.16",
"packages": [
{
"description": "This package contains public General for capire ord integration test.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ exports[`ORD Integration Tests - mTLS Development Mode (cfMtls object with confi
"visibility": "public",
},
],
"openResourceDiscovery": "1.14",
"openResourceDiscovery": "1.16",
"packages": [
{
"description": "This package contains public General for capire ord integration test.",
Expand Down Expand Up @@ -441,7 +441,7 @@ exports[`ORD Integration Tests - mTLS Development Mode (cfMtls object with confi
"visibility": "public",
},
],
"openResourceDiscovery": "1.14",
"openResourceDiscovery": "1.16",
"packages": [
{
"description": "This package contains public General for capire ord integration test.",
Expand Down Expand Up @@ -676,7 +676,7 @@ exports[`ORD Integration Tests - mTLS Development Mode (cfMtls object with confi
"visibility": "public",
},
],
"openResourceDiscovery": "1.14",
"openResourceDiscovery": "1.16",
"packages": [
{
"description": "This package contains public General for capire ord integration test.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ exports[`ORD Integration Tests - mTLS Production Mode (cfMtls: true) ORD Documen
"visibility": "public",
},
],
"openResourceDiscovery": "1.14",
"openResourceDiscovery": "1.16",
"packages": [
{
"description": "This package contains public General for capire ord integration test.",
Expand Down Expand Up @@ -474,7 +474,7 @@ exports[`ORD Integration Tests - mTLS Production Mode (cfMtls: true) ORD Documen
"visibility": "public",
},
],
"openResourceDiscovery": "1.14",
"openResourceDiscovery": "1.16",
"packages": [
{
"description": "This package contains public General for capire ord integration test.",
Expand Down Expand Up @@ -727,7 +727,7 @@ exports[`ORD Integration Tests - mTLS Production Mode (cfMtls: true) Production
"visibility": "public",
},
],
"openResourceDiscovery": "1.14",
"openResourceDiscovery": "1.16",
"packages": [
{
"description": "This package contains public General for capire ord integration test.",
Expand Down Expand Up @@ -980,7 +980,7 @@ exports[`ORD Integration Tests - mTLS Production Mode (cfMtls: true) mTLS Authen
"visibility": "public",
},
],
"openResourceDiscovery": "1.14",
"openResourceDiscovery": "1.16",
"packages": [
{
"description": "This package contains public General for capire ord integration test.",
Expand Down
2 changes: 1 addition & 1 deletion __tests__/unit/__snapshots__/defaults.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ exports[`defaults description should return default value 1`] = `"this is an app

exports[`defaults groupTypeId should return default value 1`] = `"sap.cds:service"`;

exports[`defaults openResourceDiscovery should return default value 1`] = `"1.14"`;
exports[`defaults openResourceDiscovery should return default value 1`] = `"1.16"`;

exports[`defaults policyLevels should return default value 1`] = `
[
Expand Down
4 changes: 2 additions & 2 deletions __tests__/unit/__snapshots__/mocked-csn.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ exports[`Tests for ORD document generated out of mocked csn files Tests for ORD
"title": "This is test Cinema Service title",
},
],
"openResourceDiscovery": "1.14",
"openResourceDiscovery": "1.16",
"packages": [
{
"description": "This package contains public General for capire bookshop ord sample.",
Expand Down Expand Up @@ -366,7 +366,7 @@ exports[`Tests for ORD document generated out of mocked csn files Tests for ORD
"title": "EbMtEmitter Service",
},
],
"openResourceDiscovery": "1.14",
"openResourceDiscovery": "1.16",
"packages": [
{
"description": "This package contains public General for capire bookshop ord sample.",
Expand Down
18 changes: 9 additions & 9 deletions __tests__/unit/__snapshots__/ord.e2e.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -971,7 +971,7 @@ exports[`Tests for Data Product definition Check interop CSN annotation mapping
"title": "Test Service",
},
],
"openResourceDiscovery": "1.14",
"openResourceDiscovery": "1.16",
"packages": [
{
"description": "This package contains public General for cap js ord.",
Expand Down Expand Up @@ -2220,7 +2220,7 @@ exports[`Tests for Data Product definition Check interop CSN service name parsin
"title": "Simple Service",
},
],
"openResourceDiscovery": "1.14",
"openResourceDiscovery": "1.16",
"packages": [
{
"description": "This package contains public General for cap js ord.",
Expand Down Expand Up @@ -2335,7 +2335,7 @@ exports[`Tests for eventResource and apiResource should block MTXServices when m
"title": "My Service",
},
],
"openResourceDiscovery": "1.14",
"openResourceDiscovery": "1.16",
"packages": [
{
"description": "This package contains public General for capire bookshop ord sample.",
Expand Down Expand Up @@ -2450,7 +2450,7 @@ exports[`Tests for eventResource and apiResource should block OpenResourceDiscov
"title": "My Service",
},
],
"openResourceDiscovery": "1.14",
"openResourceDiscovery": "1.16",
"packages": [
{
"description": "This package contains public General for capire bookshop ord sample.",
Expand Down Expand Up @@ -2565,7 +2565,7 @@ exports[`Tests for eventResource and apiResource should exclude external service
"title": "My Service",
},
],
"openResourceDiscovery": "1.14",
"openResourceDiscovery": "1.16",
"packages": [
{
"description": "This package contains public General for capire bookshop ord sample.",
Expand Down Expand Up @@ -2680,7 +2680,7 @@ exports[`Tests for eventResource and apiResource should exclude service when it
"title": "My Service",
},
],
"openResourceDiscovery": "1.14",
"openResourceDiscovery": "1.16",
"packages": [
{
"description": "This package contains public General for capire bookshop ord sample.",
Expand Down Expand Up @@ -2964,7 +2964,7 @@ exports[`Tests for products and packages should not contain products property if
"title": "v1 Service",
},
],
"openResourceDiscovery": "1.14",
"openResourceDiscovery": "1.16",
"packages": [
{
"description": "This package contains public General for capire bookshop ord sample.",
Expand Down Expand Up @@ -3240,7 +3240,7 @@ exports[`Tests for products and packages should raise error log when custom prod
"title": "v1 Service",
},
],
"openResourceDiscovery": "1.14",
"openResourceDiscovery": "1.16",
"packages": [
{
"description": "This package contains public General for capire bookshop ord sample.",
Expand Down Expand Up @@ -3524,7 +3524,7 @@ exports[`Tests for products and packages should use valid custom products ordId
"title": "v1 Service",
},
],
"openResourceDiscovery": "1.14",
"openResourceDiscovery": "1.16",
"packages": [
{
"description": "This package contains public General for capire bookshop ord sample.",
Expand Down
2 changes: 1 addition & 1 deletion lib/defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const sizeLimit = 2000000; // 2mb
*/
module.exports = {
$schema: "https://open-resource-discovery.github.io/specification/spec-v1/interfaces/Document.schema.json",
openResourceDiscovery: "1.14",
openResourceDiscovery: "1.16",
policyLevels: ["none"],
groupTypeId: "sap.cds:service",
description: "this is an application description",
Expand Down
3 changes: 2 additions & 1 deletion lib/extend-ord-with-custom.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@ const SCALAR_TYPES = Object.freeze(["number", "string", "boolean"]);
const MERGE_STRATEGIES = Object.freeze({
// Directly replace scalar values and scalar value arrays
$schema: (current, custom) => custom,
baseUrl: (current, custom) => custom,
description: (current, custom) => custom,
perspective: (current, custom) => custom,
openResourceDiscovery: (current, custom) => custom,
policyLevel: (current, custom) => custom,
customPolicyLevel: (current, custom) => custom,
policyLevels: (current, custom) => prune(custom),
openResourceDiscovery: (current, custom) => custom,

// Perform simple merge for objects
describedSystemType: (current, custom) => prune(_.assign(current, custom)),
Expand Down
1 change: 1 addition & 0 deletions lib/ord.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ module.exports = (csn, extensions) => {
[...(extensions || []), getCustomORDContent(appConfig)].filter(Boolean), //
{
$schema: defaults.$schema,
baseUrl: appConfig.env.baseUrl,
Comment thread
mlakov marked this conversation as resolved.
groups: createGroups(appConfig),
products: createProducts(appConfig),
packages: createPackages(appConfig),
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"@cap-js/cds-test": "0.4.1",
"@cap-js/graphql": "^0.14.0",
"@cap-js/sqlite": "^2",
"@open-resource-discovery/specification": "1.14.5",
"@open-resource-discovery/specification": "1.16.0",
"@sap/cds-dk": ">=8.9.5",
"eslint": "^10.0.0",
"express": "^5.0.0",
Expand Down
Loading