cancel
Showing results for 
Search instead for 
Did you mean: 

Can we use multiple annotations files for a single app?

GuyF
Active Participant
0 Kudos

Hello,

I'm creating a Fiori Elements app, and due to the old version of the SAP ECC system, many CDS View annotations are not available. This forces me to add a very large number of annotations in the local annotations.xml file of the app itself. I'm concerned that this file will become so large that it will become difficult to maintain, and wanted to split the annotations between multiple files.

I added a second annotations file, copied the annotations for the vocabulary includes and my app's namespace "main" annotation (starting with <edmx:DataServices>xmlns="http://docs.oasis-open.org/odata/ns/edm" Namespace="app.namespace"> tags). It seems to work, but I got error messages in VS Code for both annotation files - "Duplicate schema namespace - namespace is already used (in 'annotation0.xml')".

Can I ignore this error? After all, all annotations work as expected. Am I missing something? Is this a "false-positive" error that should be a warning, or is this something which is an error on newer UI5 versions (mine is 1.71.24). If it was a warning message I would feel more comfortable ignoring it, but not an error message.

Thank you.

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member765920
Participant
0 Kudos

Hi,

I am facing the same issue. Were you able to resolve this?

Thanks,

Priyanka Kes

GuyF
Active Participant
0 Kudos

Hi Priyanka Kes,

I actually just stopped looking. I've learned to live with the large annotation file (which is close to 1000 lines now).

Guy.

virendra_soni2
Participant
0 Kudos

Hi guy.fenster

I think you can try from WEBIDE , standard way to create multiple annotation file.Right click one webapp -> New -> annotations file Provide annotation file name and select data source. there will annotation file created in workspace and also configured in manifest json.let me know if this works or not ?RegardsVirendra Soni
GuyF
Active Participant
0 Kudos

Hi Virendra Soni,

Thank you for your reply, but it's not relevant to my situation.

First of all, Web IDE is only available in BTP, neo environment, and I don't have access to that. In fact, we cannot access the cloud at all for this particular customer.

Second, the question is not how to add a second annotation file. There's an option as part of the Fiori tools or the VS Code extensions. I add a second annotations file, and received an error message regarding multiple files with the same namespace. I wanted to know if I can ignore this error message or not.