In general, the manifest describes the behavior of an app through attributes. It doesn't directly influence that behavior itself for the most part. When a section in the manifest does affect the behavior of an app, this is described in the API Reference. for the corresponding namespace.
The data of the manifest is stored in JSON format in the manifest.json
file.
The developer creates the file with attributes in different namespaces. It contains, for
example, the app ID, the version, the data sources used, along with the required
components and libraries. The existence of the manifest.json
file must
be declared in the component metadata, which is then delivered as part of the
application archive. After delivery, the file is read-only.
There is a new version of the manifest when the schema is changed. In the following table, you
can see how the SAPUI5
version is related to the manifest version and the value of
_version.
Manifest Release |
SAPUI5 Version |
_version |
---|---|---|
Version 2 |
>=1.30 |
1.1.0 |
Version 3 |
>=1.32 |
1.2.0 |
Version 4 |
>=1.34 |
1.3.0 |
Version 5 |
>=1.38 |
1.4.0 |
Version 6 |
>=1.42 |
1.5.0 |
Version 7 |
>=1.46 |
1.6.0 |
Version 8 |
>=1.48 |
1.7.0 |
Version 9 |
>=1.50 |
1.8.0 |
Version 10 |
>=1.52 |
1.9.0 |
Version 11 |
>=1.54 |
1.10.0 |
Version 12 |
>=1.56 |
1.11.0 |
Version 13 |
>=1.58 |
1.12.0 |
Version 14 |
>=1.61 |
1.13.0 |
Version 15 |
>=1.62 |
1.14.0 |
Version 16 |
>=1.66 |
1.15.0 |
Version 17 |
>=1.70 |
1.16.0 |
Version 18 |
>=1.71 |
1.17.0 |
Version 19 |
>=1.74 |
1.18.0 |
Version 20 |
>=1.75 |
1.19.0 |
Version 21 |
>=1.76 |
1.20.0 |
Version 22 |
>=1.77 |
1.21.0 |
Version 23 |
>=1.78 |
1.22.0 |
Version 24 |
>=1.79 |
1.23.0 |
Version 25 |
>=1.80 |
1.24.0 |
Version 26 |
>=1.81 |
1.25.0 |
Version 27 |
>=1.82 |
1.26.0 |
Version 28 |
>=1.83 (SAPUI5 1.83 was not released, see 2979657) |
1.27.0 |
Version 29 |
>=1.84 |
1.28.0 |
Version 30 |
>=1.85 |
1.29.0 |
Version 31 |
>=1.86 |
1.30.0 |
Version 32 |
>=1.87 |
1.31.0 |
Version 33 |
>=1.88 |
1.32.0 |
Version 34 |
>=1.90 |
1.33.0 |
Version 35 |
>=1.92 |
1.34.0 |
Version 36 |
>=1.93 |
1.35.0 |
Version 37 |
>=1.95 |
1.36.0 |
Version 38 |
>=1.96 |
1.37.0 |
Version 39 |
>=1.98 |
1.38.0 |
Version 40 |
>=1.99 |
1.39.0 |
Version 41 |
>=1.100 |
1.40.0 |
Version 42 |
>=1.101 |
1.41.0 |
Version 43 |
>=1.102 |
1.42.0 |
Version 44 |
>=1.103 |
1.43.0 |
Version 45 |
>=1.104 |
1.44.0 |
Version 46 |
>=1.105 |
1.45.0 |
Version 47 |
>=1.106 |
1.46.0 |
Version 48 |
>=1.107 |
1.47.0 |
Version 49 |
>=1.108 |
1.48.0 |
Version 50 |
>=1.109 |
1.49.0 |
Version 51 |
>=1.110 |
1.50.0 |
Version 52 |
>=1.111 |
1.51.0 |
Version 53 |
>=1.112 |
1.52.0 |
Version 54 |
>=1.113 |
1.53.0 |
Version 55 |
>=1.114 |
1.54.0 |
Version 56 |
>=1.115 |
1.55.0 |
Version 57 |
>=1.116 |
1.56.0 |
Version 58 |
>=1.117 |
1.57.0 |
Version 59 |
>=1.118 |
1.58.0 |
Version 60 |
>=1.119 |
1.59.0 |
Version 61 |
>=1.120 |
1.60.0 |
Version 62 |
>=1.121 |
1.61.0 |
Version 63 |
>=1.122 |
1.62.0 |
Version 64 |
>=1.123 |
1.63.0 |
Version 65 |
>=1.124 |
1.64.0 |
Version 66 |
>=1.126 |
1.65.0 |
Version 67 |
>=1.129 |
1.66.0 |
Version 68 |
>=1.130 |
1.67.0 |
Version 69 |
>=1.131 |
1.68.0 |
Version 70 |
>=1.132 |
1.69.0 |
Version 71 |
>=1.133 |
1.70.0 |
Version 72 |
>=1.134 |
1.71.0 |
Version 73 |
>=1.134 |
1.72.0 |
For more information on the new fields introduced in each version, check out Migration Information for Upgrading the Manifest File
The component factory function Component.create
, as introduced with 1.58, loads the manifest.json
by
default before the component instance is created. With this, you can preload the dependencies (libraries and components) and, thus,
improve the performance for loading the component. The preload is also available for models, which can be flagged for preload during
component loading.
The manifest
option allows you to configure when and from where the manifest
is loaded:
Default, equivalent to setting manifest
to
true
.
// "Component" required from module "sap/ui/core/Component" // load manifest.json from default location and evaluate it before creating an instance of the component Component.create({ name: "sap.my.component", });
manifest
for the
component factory
function:// "Component" required from module "sap/ui/core/Component" // load via manifest URL Component.create({ name: "sap.my.component", manifest: "any/location/sap/my/component/manifest.json" });
There are two possible scenarios for setting the manifest
flag to false
:
The component defines manifest: "json"
in its
Component Metadata.
In this case, the manifest is loaded and evaluated after the Component controller. All dependencies defined in the manifest will then also be loaded. Afterwards, the Component is instantiated.
The component does not define manifest: "json"
in its Component Metadata.
This is typically the case for older legacy Components without a manifest. In this case, only the Component's class metadata is evaluated. No additional manifest file will be loaded.
// "Component" required from module "sap/ui/core/Component" // load component without loading a manifest first // - Case 1: the manifest.json is loaded after the Component controller // - Case 2: no manifest.json is loaded (legacy) Component.create({ name: "sap.my.component", manifest: false });
When you enable manifest
, all legacy component metadata needs to be
migrated into the manifest for applications/components. Only those entries in the
manifest for components will be respected by the component and all other entries
will be ignored.
ui5://
URLsInside the manifest, you can use special URLs prefixed with ui5://
. These URLs
will be resolved automatically during component startup before any models are
created.
The ui5://
URLs have the following properties:
ui5://my/path/to/sample
, but not
ui5:my/app/path
,ui5://
URL must be
registered on the UI5 loader beforehand (see the example below),sap.ui5/resourceRoots
can be part of a
ui5://
URL,Component.create
takes care of
defining the resource roots before any ui5://
URLs are
resolved.One common use case is the resolution of local annotation files. By default the
local annotation files are resolved relative to the manifest. When using a
ui5://
URL, you can enforce a different resolution, e.g. to
a server-absolute URL.
In this sample, we make sure that the component location is registered as a path
on the UI5 loader. Additionally, we assume that the host system is
http://localhost:8080
:
sap.ui.loader.config({ paths: { "my/url/prefix": "this/url/is/reachable" } })
The following snippet shows a sample annotation file configuration in the
sap.app/dataSources
section of the manifest:
{ ... "sap.app": { "dataSources": { "OData": { "uri": "/path/to/odata/service", "type": "OData", "settings": { "odataVersion": "2.0", "annotations": ["annotations"] ... } }, ... "annotations": { "uri": "ui5://my/url/prefix/annotations.xml", "type": "ODataAnnotation" } ... } } ... }
During startup of the respective component the resolution of the
ui5://
URL for the sample annotation will look like
this:
ui5://my/url/prefix/annotations.xml
is resolved to:
http://localhost:8080/this/url/is/reachable/annotations.xml
You can find an example manifest.json
file with sample code for the
manifest content here.
The content for the is contained in the following namespaces: without
,
sap.app
, sap.ui
,
sap.ui5
, sap.platform.abap
,
sap.platform.hcp
, and sap.fiori
. The
following tables show the application-specific attributes provided by the respective
namespaces:
Current version of the manifest.json
The following sample contains the full scope of all
available manifest properties. Some properties might not be
applicable for all manifest.json
variants. For example, the
sap.ui5/models
section is not supported for library
manifests. For more information, see the above listing of namespaces and
properties.
For the following namespaces, the indicated teams are responsible:
sap.mobile - in Mobile responsibility
sap.flp - in SAP Fiori launchpad responsibility
sap.ui.generic.app - in SAP Fiori elements responsibility
sap.ovp - in Overview Page responsibility
sap.ui.smartbusiness.app - in Smart Business responsibility
sap.wda - in Web Dynpro ABAP responsibility
sap.gui - in SAP GUI responsibility
sap.cloud.portal - in SAP BTP responsibility
sap.apf - in Analysis Path Framework responsibility
sap.platform.cf - in Cloud Foundry/XSA responsibility
sap.copilot - in Copilot responsibility
sap.map - in SAP Visual Business responsibility
sap.url - in SAP Fiori launchpad responsibility
sap.platform.sfsf - for SAP SuccessFactors specific attributes
sap.wcf - for WCF Application specific attributes
sap.cloud - for SAP BTP-specific attributes
sap.integration - in Application Integration responsibility
sap.platform.mobilecards - in Mobile Cards responsibility
sap.artifact - in SAP Work Zone responsibility
sap.package - in SAP Work Zone responsibility
sap.insights - for My Insights inside My Home
sap.bpa.task - in SAP Build Process Automation responsibility
sap.fe - in SAP Fiori elements responsibility
sap.card - in SAPUI5 responsibility
sap.cards.ap - in Cards for signature micro experience responsibility
The component declares the existence of the manifest by specifying manifest:
"json"
in the component metadata. Setting this flag makes the component
load the manifest.json
file and read the relevant entries for SAPUI5. This metadata
is used to define the dependencies that need to be loaded in order to start the
component. The following code snippet shows how to add the manifest link:
sap.ui.define([ "sap/ui/core/UIComponent" ], (UIComponent) => { "use strict"; return UIComponent.extend("my.sample.Component", { metadata : { manifest: "json", interfaces: [ "sap.ui.core.IAsyncContentCreation" ] } }); });
At runtime, the manifest content can be accessed from the component via the following sap.ui.core.Component
APIs:
// Given: oComponent === instance of sap.ui.core.Component (e.g. returned by sap.ui.core.mvc.Controller#getOwnerComponent) oComponent.getManifest(); // returns reference to the entire manifest object if it exists; otherwise returns null oComponent.getManifestEntry("sap.app"); // returns reference to the configuration section of the manifest oComponent.getManifestEntry("/sap.ui5/dependencies/libs"); // returns reference or value of the manifest configuration by path; the syntax must start with a slash