a week ago
Hi CAP team,
I have created a simple CAP project with a Fiori elements UI using the commands below:
cds init <projectname>
cds add tiny-sample
cds add xsuaa,hana --for production
cds add mta
<add UI>
cds add workzone
cds up
When I open the deployed app from HTML5 Applications menu, the app fails to fetch the metadata. The reason is that the uri of the service starts with a leading slash. In the Cloud Foundry environment, this should be removed.
"dataSources": {
"mainService": {
"uri": "/odata/v4/catalog/",
"type": "OData",
"settings": {
"annotations": [],
"odataVersion": "4.0"
}
}
}
If I create a standalone UI application, the `ui5-task-zipper` task in ui5-deploy.yaml is as follows:
- name: ui5-task-zipper
afterTask: generateVersionInfo
configuration:
archiveName: books-ui
relativePaths: true
additionalFiles:
- xs-app.json
Whereas the same task with `cds add workzone` is missing the `relativePaths: true` :
- name: ui5-task-zipper
afterTask: generateVersionInfo
configuration:
archiveName: books-ui
additionalFiles:
- xs-app.json
With `relativePaths: true`, the leading slash is removed when the zip file is created. Therefore, I think this needs to be added when creating the ui5-deploy.yaml file by `cds add workzone`.
The output of `cds -v`
@cap-js/asyncapi: 1.0.3
@cap-js/openapi: 1.2.3
@sap/cds: 9.1.0
@sap/cds-compiler: 6.1.0
@sap/cds-dk (global): 9.1.0
@sap/cds-fiori: 2.0.1
@sap/cds-mtxs: 3.1.0
Node.js: v20.13.1
cap-ui-deploy-test: 1.0.0
Request clarification before answering.
User | Count |
---|---|
41 | |
15 | |
10 | |
9 | |
6 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.