diff --git a/resources/docs/1.136.7/22f50c0f0b104bf3ba84620880793d3f.md b/resources/docs/1.136.7/22f50c0f0b104bf3ba84620880793d3f.md new file mode 100644 index 0000000..e5697be --- /dev/null +++ b/resources/docs/1.136.7/22f50c0f0b104bf3ba84620880793d3f.md @@ -0,0 +1,131 @@ +# Concept and Basic Setup + +To apply the test starter concept to your SAPUI5 project, you need to create a test suite and a generic test page that allows for the running of one or multiple test modules. + +> ### Note: +> For SAPUI5 applications, the test suite and the generic test page are typically placed in the `webapp/test` folder. The code samples in the next sections use `` as a placeholder for your SAPUI5 project namespace. Please replace this placeholder with your SAPUI5 project namespace defined in the `sap.app/id` property in the `manifest.json` file by replacing the '.' with '/', for example `my.ui5app` becomes `my/ui5app`. However, for the `` in `data-sap-ui-resource-roots`, use the exact value of `sap.app/id` \(separated by dots\). + +## The UI5 Test Suite + +A test suite configures the environment for the tests. It consists of a `*.qunit.html` page often named `testsuite.qunit.html` and a corresponding `*.qunit.js` module. + +The default naming convention for the test suite is `testsuite.qunit.html` and `testsuite.qunit.js`. + +There can be multiple test suites in a project. When adding more test suites, the naming must follow the pattern `testsuite..qunit.html` / `testsuite..qunit.js`. + +### The UI5 Test Suite Page + +The test suite page uses the `sap/ui/test/starter/createSuite.js` script to initialize the test suite in a way which is compliant to the content security policy, based on the externalized test configuration provided in the test suite module. + +Unlike with the UI5 bootstrap, this script only accepts a limited set of configuration options: + +- The `data-sap-ui-testsuite` attribute specifies the test suite module. + +- The`data-sap-ui-resource-roots` attribute registers the project-specific namespaces, allowing the test suite modules to load from the correct locations. Note that, unlike module names, this configuration requires namespaces to be separated by dots. + +``` + + + + + + QUnit test suite for NAMESPACE + + + + + + +``` + +### The UI5 Test Suite Module + +The test suite module represents the configuration file for the UI5 test suite. The module must return a configuration object in the following basic structure: + +- The `name` property represents the name of the test suite and is displayed in the test suite overview page as title. + +- The `defaults` object contains the default [Configuration Options](configuration-options-738ed02.md) for tests. + +- The `tests` object contains the definition and configuration for the individual test modules. Configuration of the individual test modules can override the default configuration. For more information on how to add a defined test module to an existing test suite, see [Creating a QUnit Test](creating-a-qunit-test-7080029.md). + + ``` + sap.ui.define(() => { + "use strict"; + + return { + name: "QUnit test suite for NAMESPACE", + defaults: {}, + tests: {} + }; + }); + ``` + + +Here is an example of a test suite module that provides default configuration for third-party modules QUnit and `sinon`. We recommend setting the version manually to prevent test failures when SAPUI5 upgrades a third-party module to a new major version with breaking changes. By default, the latest available versions are used. + +It also provides [Configuration of the SAPUI5 Runtime](configuration-of-the-sapui5-runtime-91f08de.md) at `ui5` to set the theme to `sap_horizon`. The `loader.paths` configuration is used to map the project-specific namespace to the correct location. Unlike the `data-sap-ui-resource-roots` configuration in the test suite page which only registers the`test-resources` namespace, this configuration maps the productive namespace to the parent folder \(assuming the test suite is placed within `webapp/fitest`\). The generic test `page` mentioned in the next section uses query parameters to run individual tests. The placeholders `{suite}` and `{name}` are replaced with the suite and test names, respectively. + +``` + +sap.ui.define(function () { + "use strict"; + + return { + name: "QUnit test suite for NAMESPACE", + defaults: { + page: "ui5://test-resources//Test.qunit.html?testsuite={suite}&test={name}", + qunit: { + version: 2, + }, + sinon: { + version: 4, + }, + ui5: { + theme: "sap_horizon", + }, + loader: { + paths: { + "": "../", + }, + }, + }, + tests: {}, + }; +}); +``` + +The `tests` object is empty for now. For more information on how to add a defined test module to an existing test suite, see [Adding a QUnit Test Module to a Test Suite](creating-a-qunit-test-7080029.md#loio708002929ea548fd9433954a9275eb5f__section_hp4_xhn_vcc). + +## The Generic Test Page + +The generic test page is used to run individual tests. Typically, this file is named `Test.qunit.html`. + +It includes the `sap/ui/test/starter/runTest.js` script which is responsible for loading the test suite configuration and starting the test. In the test suite module, the page is configured as `page`. It receives test suite and test name through query parameters to run a test. + +Unlike the UI5 bootstrap, the generic test page only accepts the `data-sap-ui-resource-roots` configuration where project-specific namespaces should be registered. All other UI5 configuration must be provided in the test suite module as described above \(`ui5` property\). + +``` + + + + + + + + +
+
+ + +``` \ No newline at end of file diff --git a/resources/docs/1.136.7/738ed025b36e484fa99046d0f80552fd.md b/resources/docs/1.136.7/738ed025b36e484fa99046d0f80552fd.md new file mode 100644 index 0000000..308da57 --- /dev/null +++ b/resources/docs/1.136.7/738ed025b36e484fa99046d0f80552fd.md @@ -0,0 +1,173 @@ +# Configuration Options + +The UI5 test suite module contains the configuration for the UI5 test suite. + +## **Available Options and Default Values** + +The following options are available on the `defaults` and the individual test configuration objects: + +> ### Note: +> The values used in the following code are the default values and are used as a fallback for options that are not defined in the configuration file - neither in the `defaults` object, nor in an individual test configuration object. + +``` + +{ + /* + * ID(s) of the module(s) to load. + * + * Can either be a single string or an array of strings. + * Each string might start with a leading "./" + * when the test module is located in the same folder + * as the testsuite configuration. + * You can use the following placeholder: + * {name} - name of the current test module + */ + module: "./{name}.qunit", + + + /* + * URL of the test page to start for this test. + * + * By default, all tests use the generic starter page which reads the suite + * configuration, finds the tests and starts the configured test components + * before it requires and executes the configured test module(s). + * + * The URL must be relative to the application root and can use the following + * placeholders, enclosed in curly braces: + * {suite} - name of the testsuite (configuration) + * {name} - name of the current test module + */ + page: "resources/sap/ui/test/starter/Test.qunit.html?testsuite={suite}&test={name}", + + + /* + * Title of the test. + * The URL must be relative to the application root and can use the following + * placeholders, enclosed in curly braces: + * {suite} - name of the testsuite (configuration) + * {name} - name of the current test module + */ + title: "QUnit tests '{name}' of suite '{suite}'", + + + /* + * QUnit configuration. + * + * Either can be a null or false or an object with the properties documented below. + * The values null and false are equivalent to the object { version: null } + */ + qunit: { + /* + * Version of QUnit that should be loaded. + * If set to a null, QUnit won't be loaded. + * If set to "edge", the newest available version of QUnit will be used. + * If set to a number, the corresponding version of QUnit will be used if supported. + * Currently supported versions are 1 and 2, an error will be thrown for unsupported versions. + */ + version: "edge", + + /* + * Most statically configurable options from QUnit.config can be configured, + * e.g. reorder, blocking etc. + * Note that 'autostart' is an exception. To avoid timing issues with asynchronous test + * loading, 'autostart' will always be set to false. Only after all tests have been loaded, + * QUnit.start() will be called, either by the generic test starter or by the test module itself, + * see the general test option 'autostart' below. + */ + // reorder: true // only serves as an example, not part of the internal defaults of the starter + }, + + /* + * Sinon.JS configuration. + * + * Either can be a null or false or an object with the properties documented below. + * The values null and false are equivalent to the object { version: null } + */ + sinon: { + + /* + * Version of Sinon.JS that should be loaded. + * If set to null, Sinon won't be loaded. + * If set to "edge", the newest available version of Sinon will be used. + * If set to a number, the corresponding version of Sinon will be used if supported. + * Currently supported are versions 1 and 4, an error will be thrown for unsupported versions. + */ + version: "edge", + + /* + * Whether one of the sinon-qunit bridges will be loaded. + * When set to true, the sap/ui/thirdparty/sinon-qunit bridge will be loaded for Sinon 1 + * and the sap/ui/qunit/sinon-qunit-bridge will be loaded for newer versions of Sinon. + * + * The bridge will only be loaded after both, QUnit and Sinon.JS have been loaded. + * If either QUnit or Sinon.JS are not loaded, no bridge will be loaded. + * + * If Sinon.JS is not loaded, but QUnit, the bridge will not be loaded, but a shim + * with dependencies will be configured. This allows tests to load Sinon.JS/the bridge on + * their own without taking care of the bridge dependencies. + */ + qunitBridge: true, + + + /* + * Any other statically configurable Sinon option can be specified as well. + * Note that they only play a role when a sandbox is used. + */ + useFakeTimers: false, + useFakeServer: false + }, + + + /* + * Code coverage options. + * The qunit-coverage module will always be loaded after QUnit has been loaded to enable the coverage + * option. When the 'coverage' parameter is set in the URL (e.g. because the coverage checkbox has been + * clicked), then blanket will be loaded before qunit-coverage to avoid synchronous loading of it. + */ + coverage: { + only: null, + never: null, + branchTracking: false + }, + + /* + * UI5 runtime configuration options. + * + * All properties will be copied to window["sap-ui-config"]. + * If window["sap-ui-config"] doesn't support it or if the value is of a type + * not supported for window["sap-ui-config"], executing the UI5 Core might fail. + * + * Only exception for now: the libs property can be an array of library names, + * not only a comma separated string. + * + * To ease test development, the following defaults are defined by the test starter: + */ + ui5: { + noConflict: true, + libs: [], + theme: "default" + }, + + /* + * UI5 Loader configuration. + * + * The provided configuration will be passed to `sap.ui.loader.config` and can be used to + * configure paths, shims, and other loader configuration. + */ + loader: {}, + + /* + * Whether the test starter should call QUnit.start() after all prerequisites have been fulfilled + * (e.g. QUnit, Sinon, a bridge, have been loaded, coverage tooling has been loaded and configured, + * the Core has been booted, the test modules have been loaded and executed). + */ + autostart: true, + + + /* + * Whether the test starter should skip a test file. Such tests will remain in the overview list, + * but won't be executed in the test suite. + */ + skip: false +}; +``` \ No newline at end of file diff --git a/resources/docs/1.136.7/be0cf40f61184b358b5faedaec98b2da.md b/resources/docs/1.136.7/be0cf40f61184b358b5faedaec98b2da.md new file mode 100644 index 0000000..1b9c48b --- /dev/null +++ b/resources/docs/1.136.7/be0cf40f61184b358b5faedaec98b2da.md @@ -0,0 +1,3075 @@ +# Manifest \(Descriptor for Applications, Components, and Libraries\) + +The manifest \(also known as descriptor for applications, components, and libraries, in short: app descriptor\) is inspired by the WebApplication Manifest concept introduced by the W3C. The manifest provides a central, machine-readable, and easy-to-access location for storing metadata associated with an application, an application component, or a library. + +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](https://ui5.sap.com/#/api/). 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. + +## General Information + +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 and SAPUI5 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](https://me.sap.com/notes/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.135 + + + +1.72.3 + +
+ +Version 74 + + + +\>=1.136 + + + +1.73.1 + +*or* + +2.0.0 + +
+ +For more information on the new fields introduced in each version, check out [Migration Information for Upgrading the Manifest File](migration-information-for-upgrading-the-manifest-file-a110f76.md) + +## Manifest 2.0 + +As of SAPUI5 1.136, we support a new manifest version 2.0.0. Using this version has the following implications for a Component: + +### Root View and Routing Configuration + +The synchronous root view creation and routing configuration are not supported anymore. + +The `async` flag for both the `rootView` and the `routing` configuration is now implicitly `true` and must no longer be specified. + +### Deprecated Manifest Entries + +Deprecated manifest entries managed by the SAPUI5 framework cannot be used anymore and will cause errors. This has the following consequences: + +- Arbitrary JavaScript resources cannot be loaded via `sap.ui5/resources/js` anymore. Please use dedicated modules as eager dependencies instead, e.g. within your `Component.js`. +- The routing properties `viewId`, `viewName`, `viewPath`, and `viewLevel` cannot be used anymore. Please use the documented alternatives instead, i.e. replace them with the properties `id`, `name`, `path`, and `level`, respectively, alongside adding the `type: "View"`. For more information, see [Routing Configuration](routing-configuration-9023130.md). +- Supported themes cannot be specified via the `sap.ui/supportedThemes` section. + +### Error Validation + +Manifest version 2.0.0 also enables a stricter error handling for views and fragments. Syntactical errors \(e.g. broken binding strings\) will now lead to errors being thrown. Programmatically created views will reject the factory promise accordingly. + +### `IAsyncContentCreation` + +While the Manifest 2.0.0 behavior regarding root view and routing configuration is similar to the behavior of the [`sap.ui.core.IAsyncContentCreation`](https://ui5.sap.com/#/api/sap.ui.core.IAsyncContentCreation) interface, they are not interchangeable. For compatibility reasons, the manifest version 2.0.0 does **not** enforce the implementation of this interface. In order to use an asynchronous `sap/ui/core/UIComponent#createContent` implementation in your subclasses, the `sap.ui.core.IAsyncContentCreation` interface must be implemented explicitly. + +Please also be aware that the implementation of the `sap.ui.core.IAsyncContentCreation` interface changes the aggregation behavior of the root view. When the root view is loaded asynchronously and the Component implements `sap.ui.core.IAsyncContentCreation`, the root view controller's [`onInit`](https://ui5.sap.com/#/api/sap.ui.core.mvc.Controller%23methods/onInit) hook no longer has access to Component models through the view instance. To retrieve model instances, we recommend using the [`sap/ui/core/mvc/Controller#getOwnerComponent`](https://ui5.sap.com/#/api/sap.ui.core.mvc.Controller%23methods/getOwnerComponent) API on the controller instance. + +We recommend any Component or UIComponent to implement the `sap.ui.core.IAsyncContentCreation` interface whenever possible. + +## Manifest First Function + +The component factory function [`Component.create`](https://ui5.sap.com/#/api/sap.ui.core.Component%23methods/sap.ui.core.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`. + + ```js + // "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", + }); + ``` + +- Specify an alternative URL as parameter for `manifest` for the component factory function: + + ```js + // "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`: + + 1. The component defines `manifest: "json"` in its [Component Metadata](component-metadata-0187ea5.md). + + 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. + + 2. The component does not define `manifest: "json"` in its [Component Metadata](component-metadata-0187ea5.md). + + 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. + + + ```js + // "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 + }); + ``` + + +> ### Note: +> 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. + +## Special `ui5://` URLs + +Inside 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: + +- only absolute URLs are allowed, e.g. `ui5://my/path/to/sample`, but not `ui5:my/app/path`, +- all URL prefixes to be used inside a `ui5://` URL must be registered on the UI5 loader beforehand \(see the example below\), +- `sap.ui5/resourceRoots` can be part of a `ui5://` URL, +- the component factory [`Component.create`](https://ui5.sap.com/#/api/sap.ui.core.Component%23methods/sap.ui.core.Component.create) takes care of defining the resource roots before any `ui5://` URLs are resolved. + +### Example + +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` : + +```js +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: + +```json +{ + ... + "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: + +```html +ui5://my/url/prefix/annotations.xml +``` + +is resolved to: + +```html +http://localhost:8080/this/url/is/reachable/annotations.xml +``` + +## Manifest Content + +> ### Note: +> You can find an example `manifest.json` file with sample code for the manifest content [here](manifest-descriptor-for-applications-components-and-libraries-be0cf40.md#loiobe0cf40f61184b358b5faedaec98b2da__section_example). + +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: + +[No Namespace](manifest-descriptor-for-applications-components-and-libraries-be0cf40.md#loiobe0cf40f61184b358b5faedaec98b2da__section_nonamespace) + +[`sap.app`](manifest-descriptor-for-applications-components-and-libraries-be0cf40.md#loiobe0cf40f61184b358b5faedaec98b2da__section_sap_app) + +[`sap.ui`](manifest-descriptor-for-applications-components-and-libraries-be0cf40.md#loiobe0cf40f61184b358b5faedaec98b2da__section_sap_ui) + +[`sap.ui5`](manifest-descriptor-for-applications-components-and-libraries-be0cf40.md#loiobe0cf40f61184b358b5faedaec98b2da__section_sap_ui5) + +[`sap.platform.abap`](manifest-descriptor-for-applications-components-and-libraries-be0cf40.md#loiobe0cf40f61184b358b5faedaec98b2da__section_sap_platform_abap) + +[`sap.platform.hcp`](manifest-descriptor-for-applications-components-and-libraries-be0cf40.md#loiobe0cf40f61184b358b5faedaec98b2da__section_sap_platform_hcp) + +[`sap.fiori`](manifest-descriptor-for-applications-components-and-libraries-be0cf40.md#loiobe0cf40f61184b358b5faedaec98b2da__section_sap_fiori) + +[`sap.card`](manifest-descriptor-for-applications-components-and-libraries-be0cf40.md#loiobe0cf40f61184b358b5faedaec98b2da__section_sap_card) + +[`_version`](manifest-descriptor-for-applications-components-and-libraries-be0cf40.md#loiobe0cf40f61184b358b5faedaec98b2da__section_version) + +## No Namespace + +**Attributes in the without namespace** + + + + + + + + + + + + + + + +
+ +Attribute + + + +Description + +
+ +`start_url` + + + +Start page of your app, if available + +
+ +`$schema` + + + +JSON schema URI + +
+ +## `sap.app` + +**Attributes in the mandatory sap.app namespace** + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +Attribute + + + +Description + +
+ +`id` + + + +A mandatory attribute that has to be provided in dot notation and specifies an ID for the project that must be unique in the system. It must match the namespace provided in the corresponding `Component.js`. + +If, for example, a module is instantiated there as follows: + +```js + return UIComponent.extend("sap.ui.demo.walkthrough.Component", { + + metadata : { + manifest: "json" + }, + ... + +``` + +then its `id` would be `sap.ui.demo.walkthrough` + +It's used as a reference point for most operations involving the manifest. If the project is the app variant of an existing application, `sap.app/id` is the ID of this app variant. The ID of the underlying application is then provided in `sap.ui5/componentName`. + +> ### Note: +> The ID must not exceed 70 characters. It must be unique. This is checked in consistency checks, for example for the SAPUI5 application index, which return an error in case of duplicate IDs; see [SAPUI5 Application Index](../05_Developing_Apps/sapui5-application-index-c5e7098.md). +> +> In case of `sap.app/type=application`, the `sap.app/id` corresponds to the `id` of the UI5 component. + +
+ +`type` + + + +A mandatory attribute. The following values are possible: + +- `application`: use if your `manifest.json` describes a **UI5 application**. For an example how to use a `manifest.json` for UI5 applications, see [Step 10: Descriptor for Applications](../03_Get-Started/step-10-descriptor-for-applications-8f93bf2.md) + +- `component`: use if your `manifest.json` describes a **reuse component** that is used in several apps. For further reuse component-specific configuration options, see [Descriptor for Components \(Inside Libraries\)](descriptor-for-components-inside-libraries-7701636.md). + +- `library`: use if your `manifest.json` describes a **UI5 library**. For further library-specific configuration options, see [Descriptor for Libraries](descriptor-for-libraries-b229914.md). + +- `card`: use if your `manifest.json` describes a **UI5 card**.For further card-specific configuration options, see [Integration Cards](https://ui5.sap.com/test-resources/sap/ui/integration/demokit/cardExplorer/webapp/index.html#/overview/introduction). + +
+ +`i18n` + + + +The i18n property is an **optional** attribute and contains one of the following: + +- A URL string to the properties file that contains the text symbols for the manifest; the URL is interpreted relative to the `manifest`. + + > ### Note: + > The path to the i18n file must not exceed 100 characters. + +- An object that has been defined as described in [Supported Locales and Fallback Chain](supported-locales-and-fallback-chain-ec753bc.md) and [Terminologies](terminologies-eba8d25.md). + + > ### Note: + > The `sap.app/i18n` section only supports terminologies for Components. Library manifests **do not support** additional terminologies. + + +If the manifest contains placeholders in `{{...}}` syntax, but no `i18n` attribute has been provided, the default value `i18n/i18n.properties` is used to request a ResourceBundle. + +
+ +`applicationVersion` + + + +Mandatory version of the app \(semantic version with the following format **`major.minor.patch`**\) + +
+ +`embeds` + + + +Array of relative paths to the nested `manifest.json` files; attribute is mandatory if a nested `manifest.json` exists + +
+ +`embeddedBy` + + + +Relative path back to the `manifest.json` file of an embedding component or library; attribute is mandatory for a nested `manifest.json` + +
+ +`title` + + + +Mandatory attribute; to make this property language dependent \(recommended\), use a key in double curly brackets: `{{key}}` + +
+ +`subTitle` + + + +Subtitle; to make this property language dependent \(recommended\), use a key in double curly brackets: `{{key}}` + +
+ +`shortTitle` + + + +Short version of the title; to make this property language dependent \(recommended\), use a key in double curly brackets: `{{key}}` + +
+ +`info` + + + +Needed for CDM \(Common Data Model\) conversion of tiles; to make this property language dependent \(recommended\), use a key in double curly brackets: `{{key}}` + +
+ +`description` + + + +Description; to make this property language dependent \(recommended\), use a key in double curly brackets: `{{key}}` + +
+ +`tags` + + + +Contains the following: + +- An array of **`keywords`**; either text or a language-dependent entry to be specified via `{{…}}` syntax, for example `"keywords": ["{{keyWord1}}","{{keyWord2}}"]`. + +- An array of **`technicalAttributes`** \(general technical attributes, for example, technical catalog, upper case and language-independent attributes\). + +
+ +`ach` + + + +Application component hierarchy \(SAP's component names for bug reports\); attribute is mandatory for SAP apps, but is not used so far for apps developed outside SAP + +
+ +`dataSources` + + + +Unique key/alias for specifying the used data sources; contains the following information: + +- `uri`: Mandatory relative URL in the component; takes `embeddedBy` into account, if filled, or the server absolute of the data source, for example `"/sap/opu/odata/snce/PO_S_SRV;v=2/"`. `uri` should always be given in lower case. +- `type`: Supported types: + - `OData` \(default\) + - `ODataAnnotation` + - `INA` + - `XML` + - `JSON` + - `FHIR` + - `http` + - `WebSocket` + +- `customType` \(As of 1.77\): `true`/`false`; if `true`, there is no validation on the `type` attribute +- `settings`: Data source type-specific attributes \(key, value pairs\), which are: + - `odataVersion`: 2.0 \(default\), 4.0 + - `localUri`: Relative URL to local metadata document or annotation URI + - `annotations`: Array of annotations which references an existing data source of type `ODataAnnotation` under `sap.app/dataSources` + + - `maxAge`: Indicates the number of seconds the client is willing to accept with regard to the age of the data that is requested + + - `objects`: Dictionary of \(catalog\) objects offered by the INA datasource \(as of 1.92\) consisting of: + - `objectName`: Mandatory CDS view name / analytical query name + - `objectType` - mandatory type of object \(`2C` or `CDSViewName`\); values: `query`, `cdsprojectionview`, `view`, `inamodel` + - `packageName`: Name of the package + - `schemaName`: Name of the schema + +
+ +`cdsViews` + + + +Array of directly used CDS views + +This attribute is optional and only added if used via INA protocol directly, not if used via OData service. + +
+ +`offline` + + + +Indicates whether the app is running offline; default is `false` \(online\) + +
+ +`sourceTemplate` + + + +If an app has been generated from a template, this attribute is filled automatically by the generation tool: + +- `id`: Mandatory ID of the template from which the app was generated + +- `version`: Mandatory version of the template from which the app was generated + +- `toolsId`: ID generated by the tool + +
+ +`openSourceComponents` + + + +Array of directly used open source libraries for documentation purposes; not used when open source libraries are used via SAPUI5 capsulation + +- `name`: Mandatory name of the open source component + +- `version`: Required if the open source component is part of the app; not required if the open source component is part of the SAPUI5 dist layer + +- `packagedWithMySelf`: Indicates if the open source component is part of the app \(`true`\) or not \(`false`\) + +
+ +`provider` + + + +Name of the provider that owns the application. Current supported enum value is `sfsf`. + +
+ +`crossNavigation` + + + +Cross-navigation for specifying inbounds and outbounds + +- `scopes`: Scope of a site + + `sapSite` + +- `inbounds`: Unique key or alias to specify inbounds \(mandatory\); contains: + + - `semanticObject` \(mandatory\) + + - `action` \(mandatory\) + + - `icon`: Used to overwrite `sap.ui/icons/icon` + + - `title`: Used to overwrite `sap.app/title` \(to make this property language dependent \(recommended\), use a key in double curly brackets: `{{key}}`\) + + - `subTitle`: Used to overwrite `sap.app/subTitle` \(to make this property language dependent \(recommended\), use a key in double curly brackets: `{{key}}`\) + + - `shortTitle`: Used to overwrite `sap.app/shortTitle` \(to make this property language dependent \(recommended\), use a key in double curly brackets: `{{key}}`\) + + - `info`: Additional information on the title; to make this property language dependent \(recommended\), use a key in double curly brackets: `{{key}}` + + - `displayMode`: <`ContentMode` or `HeaderMode`\> Display mode for an inbound which specifies what kind of tile is displayed. A static tile can be displayed in content mode or header mode. The tile in header mode is a text only tile without an icon which allows longer title and subtitle. + + - `hideLauncher` \(`true`/`false`\): Indicates that an inbound must not be represented as a tile/link + + - `indicatorDataSource`; specifies the data source; contains: + + - `dataSource`: reference to `sap.app/dataSources` \(mandatory\) + + - `path`: Relative path to `sap.app/dataSources uri` \(mandatory\) + + - `refresh`: Defines the refresh interval + + + - `deviceTypes`: Contains objects with device types on which the app is running; if empty, use the default from `sap.ui/deviceTypes`; the following device types can be defined \(`true`/`false`\): + + - `desktop` + + - `tablet` + + - `phone` + + + - `signature`: Specifies the signature; contains: + + - `parameters` \(mandatory\): Contains parameter names with the following information: + + - `required` \(`true`/`false`\) + + - `filter`: Represents the filter only if the input parameter matches the filter; with a mandatory `value` and `format` attribute \("plain", "regexp", "reference"\) + + - `defaultValue`: Specifies the default value; has mandatory attributes `value` \(depending on the format this is a verbatim default value\) and `format` \("plain", "reference"\). If the `format` is "reference", the syntax for the `value` is as follows: "UserDefault.<parameterName>" for single-value parameters, "UserDefault.extended.<parameterName>" for sets of values and value ranges, or "User.env.<parameterName>" for supported user-specific settings. + + - `renameTo`: Used for parameter mapping to specify the parameter name in legacy ABAP applications, for example, `RF05L_BUKRS` for the `CompanyCode` parameter + + - `launcherValue`: Represents a value to be used when creating an tile intent for this inbound with value and format \("plain", "array"\) + + + - `additionalParameters` \(mandatory\): Indicates how additional parameters to the declared signature are handled; values can be, for example, "ignored", "notallowed", "allowed" + +- `outbounds`: Specifies outbounds with a unique key or alias to describe intents that can be triggered from the application to navigate containing: + + - `semanticObject` \(mandatory\); represents a business entity \(such as 'Employee'\) + + - `action` \(mandatory\); represents the action to perform on the business entity \(such as 'display'\) + + - `parameters` of navigation intents: Specifies the parameter name + + - `value`: parameters of navigation intents generated or triggered by the application, with: + + - a `value`; verbatim value \(when '`plain`' format is used\), or a pattern \(when '`regexp`' format is used\), or a value coming from a UI5 model \(when '`binding`' format is used\), or a User Default reference \(when '`reference`' format is used\) and a + - `format`; indicates how `value` is to be interpreted: + + - '`plain`': '`value`' is taken as a literal string value. + - '`reference`': '`value`' is a reference to a parameter maintained in the SAP Fiori launchpad \(such as '`UserDefault.CostCenter`'. The parameter value is used on the outbound intent parameter. + - '`regexp`': '`value`' matches the specified pattern. + - '`binding`': '`value`' is a binding path. The value from the model at the specified binding path will be used on the outbound intent parameter. + + + - `required`: Indicator whether parameter is required \(`true`, `false`\) + + + - `additionalParameters`: Indicates whether additional context parameters are to be used: + + - `ignored`: Parameters are not used + + - `allowed`: Parameters are passed on to application + +
+ +`resources` + + + +Relative URL as a reference to a file \(naming convention is `resources.json`\) that contains a list of all resources needed by the app \(all resources inside the app\); the file is generated in an SAP Fiori tools \(in SAP Business Application Studio\) build step. + +For a description of `resources.json`, see [The resources.json File](the-resources-json-file-adcbcf8.md). + +
+ +## `sap.ui` + +**Attributes in the mandatory sap.ui namespace** + + + + + + + + + + + + + + + + + + + + + + + +
+ +Attribute + + + +Description + +
+ +`technology` + + + +A mandatory attribute that specifies the UI technology; value is `UI5` + +
+ +`icons` + + + +Contains object with app-specific icons, which are: + +- `icon`: Icon of the app, can be chosen from [Icon Explorer](https://ui5.sap.com/test-resources/sap/m/demokit/iconExplorer/webapp/index.html) . +- `favIcon`: ICO file to be used inside the browser and for desktop shortcuts + + > ### Note: + > `favIcon` is not set automatically by the framework. The icons can be set manually using the `sap/ui/util/Mobile` module and the `setIcons` function. + +- `phone`: 120x120 pixel version for iPhones with low pixel density +- `phone@2`: 180x180 pixel version for iPhones with high pixel density +- `tablet`: 152x152 pixel version for iPads with low pixel density +- `tablet@2`: 167x167 pixel version for iPads with high pixel density + +
+ +`deviceTypes` + + + +Mandatory; contains objects with device types on which the app is running, such as: + +- `desktop`: Indicator for whether desktop devices are supported, `true`, `false` +- `tablet`: Indicator for whether tablet devices are supported, `true`, `false` +- `phone`: Indicator for whether phone devices are supported, `true`, `false` + +
+ +`fullWidth` + + + +Indicates whether SAP Fiori launchpad shall render the target application utilizing the full width of the viewport \(`true`\) or not \(`false`\). For more information, see [Letterboxing](https://experience.sap.com/fiori-design-web/letter-boxing/). + +> ### Note: +> This parameter is currently subject to SAP Fiori launchpad only and has no effect on standalone or SAP Fiori elements applications. Standalone applications can use `sap.m.Shell` to restrict the application width. + +
+ +## `sap.ui5` + +The `sap.ui5` namespace is aligned with the former concept of component metadata and contributes the following SAPUI5-specific attributes for the manifest, see [Migrating from Component Metadata to Manifest](migrating-from-component-metadata-to-manifest-e282db2.md) for more details. + +**Attributes in the sap.ui5 namespace** + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +Attribute + + + +Description + +
+ +`resources` + + + +Specifies additional `css` and `js` resources of the Component. + +CSS files are added to the head of the HTML page as a link tag. JavaScript files are loaded by the `require` mechanism. + +Two settings can be defined per resource: + +- `uri` \(mandatory\): URLs are resolved relative to the Component, taking the `embeddedBy` setting into account \(if filled\). + +- `id` \(optional\): Only for `css` resources; the id for a CSS file's `` element. + + +> ### Note: +> Since 1.94 the usage of `js` resources is deprecated. Please use regular `dependencies` instead. + +
+ +`dependencies` + + + +Mandatory; specifies the external dependencies that are loaded by the SAPUI5 core during the initialization phase of the component and used afterwards. These are the following libraries or components: + +- `minUI5Version`: Mandatory; Minimum version of SAPUI5 that your component requires; this information ensures that the features of the SAPUI5 runtime version of the component are available. This must be either a specific version or an array of versions where each major version can only be included once. If you specify an array that contains more than one version, and if version 1 is included, it must be at least 1.120.x. As SAPUI5 does not currently enforce use of the correct version, the `minUI5Version` is used for information purposes only. If the minimum SAPUI5 version criteria is not fulfilled, a warning is issued in the console log. + +- `libs`: ID \(namespace\) of the libraries that the SAPUI5 core should load for use in the component. If your app requires a minimum version of the lib, specify the `minVersion` for information purposes. Specify `lazy` to indicate that the lib shall be lazy loaded. + +- `components`: ID \(namespace\) of the components that the SAPUI5 core should load for use in your component. If your app requires a minimum version of the component, specify the `minVersion` for information purposes. Specify `lazy` to indicate that the component shall be lazy loaded. + + +For more information, see [Descriptor Dependencies to Libraries and Components](descriptor-dependencies-to-libraries-and-components-8521ad1.md). + +
+ +`componentUsages` + + + +Specifies the used components with the a unique key/alias. Contains the following: + +- `name`: Mandatory name of the reuse component + +- `settings`: Settings of the component + +- `componentData`: Component data of the component + +- `lazy`: Indicates whether the component usage should be lazily loaded. Default value: `true` + + +For more information, see: [Using and Nesting Components](using-and-nesting-components-346599f.md). + +
+ +`models` + + + +> ### Note: +> For component manifests only. Libraries can not define models. + +Defines models that should be created or destroyed along the component's lifecycle. The key represents the model name. Use an empty string \(""\) for the default model. + +- `type`: Model class name +- `uri`: Relative URL in the component, taking `embeddedBy` into account if filled, or server for absolute model +- `settings`: Object that is passed to the model constructor. + + > ### Example: + > You can overwrite the default binding mode with the `defaultBindingMode` attribute \(enumeration of type `sap.ui.model.BindingMode`, with values. `Default`, `OneTime`, `OneWay`, `TwoWay`\). For OData models constructor see the following: + > + > - [sap.ui.model.odata.v2.ODataModel](https://ui5.sap.com/#/api/sap.ui.model.odata.v2.ODataModel/constructor) + > + > - [sap.ui.model.odata.v4.ODataModel](https://ui5.sap.com/#/api/sap.ui.model.odata.v4.ODataModel/constructor) + > + > + > For ResourceModel constructor see: + > + > - [sap.ui.model.resource.ResourceModel](https://ui5.sap.com/#/api/sap.ui.model.resource.ResourceModel/constructor) + > + > + > The attribute `enhanceWith` can be specified with `bundleUrl`, `bundleUrlRelativeTo` \(either `component` \(default\) or `manifest`\) or `bundleName` to provide a list of additional resource bundle configurations to enhance the `ResourceModel` with. Additional attributes can be found in [Supported Locales and Fallback Chain](supported-locales-and-fallback-chain-ec753bc.md) and [Terminologies](terminologies-eba8d25.md). + +- `dataSource`: String of key or alias from `sap.app dataSources` to reference an existing data source; the `type`, `uri` and `settings` properties are set according to the data source's `type`, `uri` and `settings` \(if not already defined\). If the type under `sap.app dataSources` is `OData`, an OData Model V2 is created automatically. If you need an OData Model V1, specify the `type` as well. +- `preload`: Optional; Boolean with `true`, `false` \(default\) + + Defines whether or not the model is initialized \(preloaded\) before the component instance is created and while loading the component preload and its dependencies. + + For more information, see [Manifest Model Preload](manifest-model-preload-26ba6a5.md). + +
+ +`rootView` + + + +Specifies the root view that shall be opened; can be the view name as a string for XML views, or the view configuration object with `viewName` for the view name as a string \(see [sap.ui.core.mvc.View.create](https://ui5.sap.com/#/api/sap.ui.core.mvc.View/methods/sap.ui.core.mvc.View.create)\) and `type` for the type \(enumeration of [sap.ui.core.mvc.ViewType](https://ui5.sap.com/#/api/sap.ui.core.mvc.ViewType)\), **id**, **async**, and other properties of `sap.ui.core.mvc.view`. + +
+ +`autoPrefixId` + + + +true, false \(default\), Enables the auto prefixing for the UIComponent for IDs of ManagedObjects \(controls or elements\) which are created in the context of the `createContent` function, or any other invocation of the `Component.prototype.runAsOwner()` function \(for example a component's router uses this method when creating new views\). + +In former SAPUI5 releases this prefixing of the ID needed to be done with `oComponent.createId` by overwriting the method `getAutoPrefixId`. The same can now be achieved declaratively by setting `autoPrefixId` to true. + +
+ +`handleValidation` + + + +Possible values: `true` or `false` \(default\); used to enable or disable validation handling by the message manager for this component, see [Error, Warning, and Info Messages](error-warning-and-info-messages-62b1481.md) + +
+ +`config` + + + +Static configuration; specify the name-value pairs that you need in your component. + +
+ +`routing` + + + +Provides configuration parameters for route and router, see [Routing and Navigation](routing-and-navigation-3d18f20.md) + +
+ +`extends` + + + +Used to extend another component. + +- `component`: ID \(namespace\) of the component being extended + +- `minVersion`: Specifies the minimum version of the component being extended, for information purposes if your app requires a minimum version of the component + +- `extensions`: Component or view extensions, which enable you to replace and extend views and controllers and also to modify the views, see [Extending Apps](../08_Extending_SAPUI5_Applications/extending-apps-a264a9a.md) + +
+ +`contentDensities` + + + +Mandatory; contains an object with the content density modes that the app supports, see [Content Densities](content-densities-e54f729.md) + +- `compact`: Mandatory; indicates whether compact mode is supported \(`true`, `false`\) + +- `cozy`: Mandatory; indicates whether cozy mode is supported \(`true`, `false`\) + +
+ +`resourceRoots` + + + +Map of URL locations keyed by a resource name prefix; only relative paths inside the component are allowed and no ".." characters + +This attribute is intended for actual sub-packages of the component only, meaning that it must not be used for the component namespace itself. + +> ### Note: +> When loading with *manifest first*\(by using the property `manifest`\), the `resourceRoots` are evaluated before the component controller is loaded. Otherwise, the defined resource roots will be registered after the component controller is loaded and do not affect the modules being declared as dependencies in the component controller. + +
+ +`componentName` + + + +An optional attribute that only has to be provided if your project is a variant of an existing application. In this case the `componentName` has to contain the `sap.app/id` of the existing application which is the basis of your variant. + +
+ +`library/i18n` + + + +> ### Note: +> For library manifests only. + +Determines whether the library contains an i18n resource. The value can be either a boolean, a string, or an object. + +A string value represents a bundle URL. Relative URLs are always resolved to the library origin. If no value is set, the default `messagebundle.properties` file is loaded. + +An object value can contain additional resource bundle configuration, e.g. terminologies and supported locales. For the supported features and for sample definitions, see the respective entries at [Terminologies](terminologies-eba8d25.md) \(without `bundleUrlRelativeTo`\) and [Supported Locales and Fallback Chain](supported-locales-and-fallback-chain-ec753bc.md) . + +> ### Note: +> This attribute is beneficial if the name of the main resource bundle \(properties file\) used by your UI5 library differs from the default name `messagebundle.properties` + +
+ +`flexEnabled` + + + +Indicates whether the app is enabled for adaptation via SAPUI5 flexibility \(for example, using stable IDs\); possible values are `true`, `false` or `undefined` \(default\) + +For more information, see [SAPUI5 Flexibility: Enable Your App for UI Adaptation](../05_Developing_Apps/sapui5-flexibility-enable-your-app-for-ui-adaptation-f1430c0.md). + +
+ +`commands` + + + +Specifies provided commands with a unique key/alias. Contains: + +- `shortcut`: String that describes a key combination. When the user presses the key combination, the command is triggered. + + +The name of the command that contains the `shortcut` definition acts as a prerequisite for using the `command` property of the `sap.ui.core.CommandExecution` module. For more information, see the [API Reference: `sap.ui.core.CommandExecution`](https://ui5.sap.com/#/api/sap.ui.core.CommandExecution). + +
+ +`flexExtensionPointEnabled` + + + +Indicates whether SAPUI5 flexibility extension points are enabled for the corresponding application variant; possible values are: `true`, `false`; filled automatically during app variant merge. + +
+ +## `sap.platform.abap` + +**Attributes in the sap.platform.abap namespace** + + + + + + + + + + + +
+ +Attribute + + + +Description + +
+ +`uri` + + + +Specifies the app's URI in the ABAP system, for example `/sap/bc/ui5_ui5/sap/appName`; filled during deployment. + +
+ +## `sap.platform.hcp` + +**Attributes in the sap.platform.hcp namespace** + + + + + + + + + + + + + + + + + + + + + + + +
+ +Attribute + + + +Description + +
+ +`uri` + + + +Specifies the URI inside the SAP Business Technology Platform HTML5 application; filled during deployment, default is "" + +
+ +`providerAccount` + + + +Specifies the name of the provider account; filled during deployment + +
+ +`appName` + + + +Specifies the name of the deployed HTML5 application; filled during deployment + +
+ +`appVersion` + + + +Specifies the version of the deployed HTML5 application; filled during deployment + +
+ +## `sap.fiori` + +**Attributes in the sap.fiori namespace** + + + + + + + + + + + + + + + + + + + + + + + +
+ +Attribute + + + +Description + +
+ +`registrationIds` + + + +Array of registration IDs, for example, the SAP Fiori IDs for SAP Fiori apps + +
+ +`archeType` + + + +Mandatory archetype of the app, possible values `transactional`, `analytical`, `factsheet`, `reusecomponent`, `fpmwebdynpro`, `designstudio` + +
+ +`abstract` + + + +Indicates whether an app is an abstract \(generic\) app, which may not used directly, but needs to be specialized in the SAP Fiori launchpad content \(as of 1.87\). Please note: This attribute will not be inherited by app variants, for example, based on an adaptation project. + +
+ +`cloudDevAdaptationStatus` + + + +Release status for the developer adaptation in the cloud. The supported types are `released`, `deprecated`, `obsolete`, no value means not released \(as of 1.110.0\). + +
+ +## `sap.card` + +**Attributes in the sap.card namespace** + + + + + + + + + + + + + + + + + + + +
+ +Attribute + + + +Description + +
+ +`type` + + + +Describes the card type; possible values are `list` and `analytical` + +
+ +`header` + + + +Specifies the card's header area + +
+ +`content` + + + +Specifies the type-dependent card content + +
+ +## `_version` + +- On root level \(no namespace\): Describes the manifest format version \(mandatory\). Needs to be updated when migrating to a new manifest format version, see [Migrating from Component Metadata to Manifest](migrating-from-component-metadata-to-manifest-e282db2.md) + +- Inside namespace: Describes the namespace format version \(optional from version 1.38 on\) + +## Manifest Schema + +The newest flattened JSON schema is available on the SAP Open Source GitHub at [https://github.com/sap/ui5-manifest/](https://github.com/sap/ui5-manifest/) under Apache-2.0 License. The UI5 manifest is part of [JSON Schema Store](https://www.schemastore.org/json/) to enable schema validation, code completion, and documentation in [SAP Business Application Studio](https://help.sap.com/viewer/584e0bcbfd4a4aff91c815cefa0bce2d/Cloud/en-US/38691d191bdf436ca0d6313918f2b1e6.html) and [Visual Studio Code](https://code.visualstudio.com/docs/languages/json). + +## Example + +Current version of the `manifest.json` + +> ### Note: +> 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. + +``` + +{ + "_version": "1.73.1", + + "start_url": "index.html", + + "sap.app": { + "id": "sap.fiori.appName", + "type": "application", + "i18n": "i18n/i18n.properties", + "applicationVersion": { + "version": "1.2.2" + }, + "embeds": ["mycomponent1", "subpath/mycomponent2"], + "embeddedBy": "../../", + "title": "{{title}}", + "subTitle": "{{subtitle}}", + "shortTitle": "{{shorttitle}}", + "description": "{{description}}", + "info": "{{info}}", + "tags": { + "keywords": ["{{keyWord1}}", "{{keyWord2}}"], + "technicalAttributes": ["ATTRIBUTE1", "ATTRIBUTE2"] + }, + "ach": "PA-FIO", + "dataSources": { + "equipment": { + "uri": "/sap/opu/odata/snce/po_s_srv;v=2/", + "type": "OData", + "settings": { + "odataVersion": "2.0", + "annotations": ["equipmentanno"], + "localUri": "model/metadata.xml", + "maxAge": 360 + } + }, + "equipmentanno": { + "uri": "/sap/bc/bsp/sap/nscbn_anf_eam/bscbn_equipment_srv.anno.xml", + "type": "ODataAnnotation", + "settings": { + "localUri": "model/annotations.xml" + } + }, + "cdsService": { + "uri": "/sap/bc/ina/ina1/sap/example_cds", + "type": "INA", + "settings": { + "localUri": "localService/metadata.xml", + "objects": { + "assets": { + "objectName": "SAPFinAssets", + "objectType": "cdsprojectionview", + "packageName": "package", + "schemaName": "schema" + }, + "liabilities": { + "objectName": "SAPFinLiabilities", + "objectType": "cdsprojectionview" + } + } + } + } + }, + "cdsViews": [ + "VIEW1", "VIEW2" + ], + "resources": "resources.json", + "offline": true, + "sourceTemplate": { + "id": "sap.ui.ui5-template-plugin.1worklist", + "version": "1.0.0", + "toolsId": "C12345678" + }, + "destination": { + "name": "SAP_ERP_FIN" + }, + "openSourceComponents": [{ + "name": "D3.js", + "packagedWithMySelf": false + }], + "crossNavigation": { + "scopes": { + "sapSite": { + "value": "123" + } + }, + "inbounds": { + "contactCreate": { + "semanticObject": "Contact", + "action": "create", + "icon": "sap-icon://add-contact", + "title": "{{title}}", + "subTitle": "{{subtitle}}", + "shortTitle": "{{shorttitle}}", + "info": "{{info}}", + "displayMode": "HeaderMode", + "indicatorDataSource": { + "dataSource": "equipment", + "path": "TaskListSet/$count", + "refresh": 5 + }, + "deviceTypes": { + "desktop": true, + "tablet": true, + "phone": false + }, + "signature": { + "parameters": { + "id": { + "required": true + }, + "ContactName": { + "defaultValue": { + "value": "anonymous" + }, + "required": false, + "renameTo": "NAME2" + }, + "Gender": { + "filter": { + "value": "(male)|(female)", + "format": "regexp" + }, + "required": true, + "renameTo": "SEX", + "launcherValue": { + "value": "female", + "format": "plain" + } + } + }, + "additionalParameters": "ignored" + } + }, + "contactDisplay": { + "semanticObject": "Contact", + "action": "display", + "signature": { + "parameters": { + "id": { + "required": true + }, + "Language": { + "filter": { + "value": "EN" + }, + "required": true + }, + "SomeValue": { + "filter": { + "value": "4711" + } + }, + "GLAccount": { + "defaultValue": { + "value": "1000" + }, + "filter": { + "value": "(1000)|(2000)", + "format": "regexp" + } + } + }, + "additionalParameters": "allowed" + } + }, + "contactDisplayAlt": { + "semanticObject": "Contact", + "action": "display", + "hideLauncher": true, + "signature": { + "parameters": { + "GLAccount": { + "defaultValue": { + "value": "UserDefault.GLAccount", + "format": "reference" + }, + "filter": { + "value": "\\d+", + "format": "regexp" + }, + "required": true + }, + "SomePar": { + "filter": { + "value": "UserDefault.CostCenter", + "format": "reference" + }, + "required": true + } + }, + "additionalParameters": "allowed" + } + } + }, + "outbounds": { + "addressDisplay": { + "semanticObject": "Address", + "action": "display", + "additionalParameters": "ignored", + "parameters": { + "CompanyName": { + "value": { + "value": "companyName", + "format": "plain" + }, + "required": true + } + } + }, + "companyDisplay": { + "semanticObject": "Company", + "action": "display", + "additionalParameters": "allowed", + "parameters": { + "CompanyName": { + "value": { + "value": "companyName", + "format": "plain" + }, + "required": true + } + } + } + } + } + }, + + "sap.ui": { + "technology": "UI5", + "icons": { + "icon": "sap-icon://add-contact", + "favIcon": "icon/F1373_Approve_Purchase_Orders.ico", + "phone": "icon/launchicon/57_iPhone_Desktop_Launch.png", + "phone@2": "icon/launchicon/114_iPhone-Retina_Web_Clip.png", + "tablet": "icon/launchicon/72_iPad_Desktop_Launch.png", + "tablet@2": "icon/launchicon/144_iPad_Retina_Web_Clip.png" + }, + "deviceTypes": { + "desktop": true, + "tablet": true, + "phone": false + }, + "fullWidth": true + }, + + "sap.ui5": { + "resources": { + "css": [{ + "uri": "component.css", + "id": "componentcss" + }] + }, + "dependencies": { + "minUI5Version": "1.136.0", + "libs": { + "sap.m": { + "minVersion": "1.34.0" + }, + "sap.ui.commons": { + "minVersion": "1.34.0", + "lazy": true + } + }, + "components": { + "sap.ui.app.other": { + "minVersion": "1.1.0", + "lazy": true + } + } + }, + "componentUsages": { + "myusage": { + "name": "my.used", + "lazy": false, + "settings": {}, + "componentData": {} + } + }, + "models": { + "i18n": { + "type": "sap.ui.model.resource.ResourceModel", + "uri": "i18n/i18n.properties", + "settings": { + "enhanceWith": [{ + "bundleUrl": "i18n/i18n.properties", + "bundleUrlRelativeTo": "manifest" + }] + } + }, + "equipment": { + "preload": true, + "dataSource": "equipment", + "settings": {} + } + }, + "rootView": { + "viewName": "sap.ui.test.view.Main", + "id" : "rootView", + "async": true, + "type": "XML" + }, + "handleValidation": true, + "config": { + + }, + "routing": { + + }, + "extends": { + "component": "sap.fiori.otherApp", + "minVersion": "0.8.15", + "extensions": {} + }, + "contentDensities": { + "compact": true, + "cozy": false + }, + "resourceRoots": { + ".myname": "./myname" + }, + "componentName": "sap.fiori.appName", + "autoPrefixId": true, + "appVariantId": "hcm.leaverequest.oil", + "appVariantIdHierarchy": [ + {"layer": "VENDOR", "appVariantId": "abc", "version": "1.0.0"} + ], + "services": { + "myLocalServiceAlias": { + "factoryName": "sap.ushell.LaunchPadService", + "optional": true + } + }, + "library": { + "i18n": true + }, + "flexEnabled": true, + "flexExtensionPointEnabled": true, + "commands": { + "Save": { + "shortcut": "Ctrl+S" + } + } + }, + + "sap.platform.abap": { + "uri": "/sap/bc/ui5_ui5/sap/appName", + "uriNwbc": "" + }, + + "sap.platform.hcp": { + "uri": "", + "uriNwbc": "", + "providerAccount": "fiori", + "appName": "sapfioriappName", + "appVersion": "1.0.0", + "multiVersionApp": true + }, + + "sap.fiori": { + "registrationIds": [ + "F1234" + ], + "archeType": "transactional", + "abstract": false + }, + + "sap.mobile": {}, + "sap.flp": {}, + "sap.ui.generic.app": {}, + "sap.ovp": {}, + "sap.ui.smartbusiness.app": {}, + "sap.wda": {}, + "sap.gui": {}, + "sap.cloud.portal": {}, + "sap.apf": {}, + "sap.platform.cf": {}, + "sap.copilot": {}, + "sap.map": {}, + "sap.url": {}, + "sap.platform.sfsf": {}, + "sap.wcf": {}, + "sap.cloud": {}, + "sap.integration": {}, + "sap.platform.mobilecards": {}, + "sap.artifact": {}, + "sap.package": {}, + "sap.insights": {}, + "sap.bpa.task": {}, + "sap.cards.ap": {}, + "sap.fe": {}, + "sap.card": {} +} +``` + +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 + +## Declaration in Component Metadata + +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: + +```js +sap.ui.define([ + "sap/ui/core/UIComponent" +], (UIComponent) => { + "use strict"; + return UIComponent.extend("my.sample.Component", { + metadata : { + manifest: "json", + interfaces: [ + "sap.ui.core.IAsyncContentCreation" + ] + } + }); +}); +``` + +## SAPUI5 API + +At runtime, the manifest content can be accessed from the component via the following `sap.ui.core.Component` APIs: + +```js +// 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 +``` + +[sap.ui.core.UIComponent](https://ui5.sap.com/#/api/sap.ui.core.UIComponent) + +[Component Metadata](component-metadata-0187ea5.md "The component class provides specific metadata for components by extending the ManagedObject class. The UIComponent class provides additional metadata for the configuration of user interfaces or the navigation between views.") \ No newline at end of file diff --git a/resources/docs/1.136.7/index.json b/resources/docs/1.136.7/index.json index 2feafcf..829c383 100644 --- a/resources/docs/1.136.7/index.json +++ b/resources/docs/1.136.7/index.json @@ -54,5 +54,26 @@ "uri": "https://ui5.sap.com/1.136.7/topic/032be2cb2e1d4115af20862673bedcdb", "title": "Test Starter", "filePath": "032be2cb2e1d4115af20862673bedcdb.md" + }, + { + "shortIdentifier": "22f50c0", + "identifier": "22f50c0f0b104bf3ba84620880793d3f", + "uri": "https://ui5.sap.com/1.136.7/topic/22f50c0f0b104bf3ba84620880793d3f", + "title": "Concept and Basic Setup", + "filePath": "22f50c0f0b104bf3ba84620880793d3f.md" + }, + { + "shortIdentifier": "738ed02", + "identifier": "738ed025b36e484fa99046d0f80552fd", + "uri": "https://ui5.sap.com/1.136.7/topic/738ed025b36e484fa99046d0f80552fd", + "title": "Configuration Options", + "filePath": "738ed025b36e484fa99046d0f80552fd.md" + }, + { + "shortIdentifier": "be0cf40", + "identifier": "be0cf40f61184b358b5faedaec98b2da", + "uri": "https://ui5.sap.com/1.136.7/topic/be0cf40f61184b358b5faedaec98b2da", + "title": "Manifest \\(Descriptor for Applications, Components, and Libraries\\)", + "filePath": "be0cf40f61184b358b5faedaec98b2da.md" } ] \ No newline at end of file diff --git a/scripts/updateDocs.ts b/scripts/updateDocs.ts index f54cc75..68f5094 100644 --- a/scripts/updateDocs.ts +++ b/scripts/updateDocs.ts @@ -15,14 +15,17 @@ const docs: Record = { "1.136.7": { revisionSha: "606268961ecee7b810a1a860bebe0eb7bdc68c23", loios: [ - "0187ea5e2eff4166b0453b9dcc8fc64f", - "00737d6c1b864dc3ab72ef56611491c4", - "28fcd55b04654977b63dacbee0552712", - "a87ca843bcee469f82a9072927a7dcdb", - "676b636446c94eada183b1218a824717", - "fe1a6dba940e479fb7c3bc753f92b28c", - "b0fb4de7364f4bcbb053a99aa645affe", - "032be2cb2e1d4115af20862673bedcdb", + "0187ea5e2eff4166b0453b9dcc8fc64f", // Component Metadata + "00737d6c1b864dc3ab72ef56611491c4", // Best Practices for Loading Modules + "28fcd55b04654977b63dacbee0552712", // Best Practices for Developers + "a87ca843bcee469f82a9072927a7dcdb", // Deprecated Themes and Libraries + "676b636446c94eada183b1218a824717", // Use Asynchronous Loading + "fe1a6dba940e479fb7c3bc753f92b28c", // Content Security Policy + "b0fb4de7364f4bcbb053a99aa645affe", // Handling Events in XML Views + "032be2cb2e1d4115af20862673bedcdb", // Test Starter + "22f50c0f0b104bf3ba84620880793d3f", // Test Starter: Concept and Basic Setup + "738ed025b36e484fa99046d0f80552fd", // Test Starter: Configuration Options + "be0cf40f61184b358b5faedaec98b2da", // Manifest ], }, }; diff --git a/src/tools/run_ui5_linter/resultContext.ts b/src/tools/run_ui5_linter/resultContext.ts index 297d2c9..c407f2b 100644 --- a/src/tools/run_ui5_linter/resultContext.ts +++ b/src/tools/run_ui5_linter/resultContext.ts @@ -248,7 +248,7 @@ or \`odata\` globals are used implicitly in bindings (missing an explicit import "parsing-error": `During the linting process a syntax or parsing error occured`, "prefer-test-starter": { text: `Test-related files should be using the Test Starter concept`, - topics: ["032be2cb2e1d4115af20862673bedcdb"], + topics: ["032be2cb2e1d4115af20862673bedcdb", "22f50c0f0b104bf3ba84620880793d3f", "738ed025b36e484fa99046d0f80552fd"], }, "ui5-class-declaration": `UI5 classes are not declared correctly. This rule only applies to TypeScript code where built-in ECMAScript classes are used instead of an \`.extend()\` call`, "unsupported-api-usage": `UI5 API is not used correctly. For example, a formatter declared in a binding declaration in JavaScript is not of type \`function\``,