diff --git a/lib/defaults.js b/lib/defaults.js index c4c409b..1423a0a 100644 --- a/lib/defaults.js +++ b/lib/defaults.js @@ -25,7 +25,7 @@ module.exports = { { ordId: `customer:product:${nameWithDot(name)}:`, title: nameWithSpaces(name), - shortDescription: nameWithSpaces(name), + shortDescription: "Description for " + nameWithSpaces(name), vendor: "customer:vendor:customer:", }, ], diff --git a/lib/ord.js b/lib/ord.js index e006d0c..20f8ce7 100644 --- a/lib/ord.js +++ b/lib/ord.js @@ -33,7 +33,7 @@ const fInitializeGlobal = (csn) => { const capNamespace = csn.namespace; // namespace variable value if present in cdsrc.json take it there or else from package.json //if cdsrc.json does not have applicationNamespace, then use just the namespace - const namespace = cds.env["ord"]?.namespace || packageName.replace(/@/,'').replace(/\//g,''); + const namespace = cds.env["ord"]?.namespace || packageName.replace(/[^\w\/]/g, "").replace(/\//, "."); const applicationNamespace = cds.env?.export?.asyncapi?.applicationNamespace; if (applicationNamespace && fGetNamespaceComponents(namespace) !== fGetNamespaceComponents(applicationNamespace)) {