Skip to content

Detect mismatch of sap.app/id in manifest.json and used namespace in project #643

@flovogt

Description

@flovogt

According to UI5 Manifest documentation the property sap.app/id has to be aligned with the namespace used in the project because SAP Workzone uses this property to create the loader config / resource roots. In scenarios where projects use a separate html file with custom resource roots definition the project can be served locally but does not run when deployed to SAP Workzone.

manifest.json

{
  "sap.app": {
     "id": "sap.ui.demo.todo",
     "type": "application"
   },

Component.js

sap.ui.define([
  "sap/ui/core/UIComponent"
], (UIComponent) => {
  "use strict";
   return UIComponent.extend("myfancynamespace.todo.Component", {
     metadata: {
       manifest: "json",
         interfaces: ["sap.ui.core.IAsyncContentCreation"],
       }
     });
});

Describe the solution you'd like

UI5 linter should report and error finding and recommend to align the sap.app/id and the used namespace.

Metadata

Metadata

Assignees

Labels

detectionAn issue related to detection capabilities

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions