Skip to content

Latest commit

 

History

History
265 lines (175 loc) · 3.62 KB

Migrating_from_Component_Metadata_to_Manifest_e282db2.md

File metadata and controls

265 lines (175 loc) · 3.62 KB
loio
e282db2865e94f69972c407469b801e9

Migrating from Component Metadata to Manifest

Overview, how the component metadata are mapped to the manifest (descriptor for applications, components and libraries).

For compatibility reasons, the mapping to the manifest.json file is done automatically. If a metadata property has been defined, it can also be consumed via the corresponding property of the manifest.json file. For a detailed step-by-step guide, see Creating a Manifest File for Existing Apps.

Note:

To benefit from the performance improvements that can be achieved by using "manifest first", we recommend to migrate the component metadata to the manifest.json file. For more information about manifest first, see the Manifest First Function section in Manifest (Descriptor for Applications, Components, and Libraries).

Mapping Table

Metadata

Manifest

Comment

Component namespace

sap.app/id

-

version

sap.app/applicationVersion/version

-

config

sap.ui5/config

-

dependencies

sap.ui5/dependencies

Different format, see Dependencies section below

customizing

sap.ui5/extends/extensions

-

handleValidation

sap.ui5/handleValidation

-

includes

sap.ui5/resources

Different format, see Resources section below

rootView

sap.ui5/rootView

-

routing

sap.ui5/routing

-


Dependencies

Libraries and components are objects and not arrays. For the manifest part, we use minUI5Version instead of ui5version.

Metadata

"dependencies": {
    "ui5version": "1.30.0",
    "libs": [
        "sap.m",
        "sap.ui.unified"
    ],
    "components": [ "sap.app.otherComponent" ]
}

Manifest

"dependencies": {
    "minUI5Version": "1.30.0",
    "libs": {
        "sap.m": {},
        "sap.ui.unified": {}
    },
    "components": {
        "sap.app.otherComponent": {}
    }
}

Resources

Includes are renamed to resources and are objects and not an array.

Metadata

"includes": ["script.js", "style.css"]

Manifest

Note:

Since 1.94 the usage of js resources is deprecated. Please use regular dependencies instead.

"resources": {
    "js": [ //deprecated since 1.94
        {
            "uri": "script.js"
        }
    ],
    "css": [
        {
            "uri": "style.css"
        }
    ]
}