cancel
Showing results for 
Search instead for 
Did you mean: 

Fiori Elements UI not using OData V2 : CAP

0 Kudos

Hi I have developed an CAP project where the it has a service and some entities. I have used 

@Sap/cds-odata-v2-adapter-proxy to change to CAP Odata to V2. Now the service is served by 2 URLs, "service/<Entity>" , "v2/service/<Entity>. When I develop a Fiori elements based application on top of this CAP app, it defaults to OData V4.
manifest.json
 
"dataSources": {
     "mainService": {
          "uri": "/service/",
          "type": "OData",
          "settings": { "annotations": [], "odataVersion": "4.0" }
     }
}
 
I tried to replace the URI to "/v2/service" , but UI is not getting initialized, rather it throws error on OData Meta Model ( I think it is specific to OData V4 ).

Please let me know what is the fix.

View Entire Topic
junwu
Active Contributor
0 Kudos

I think you have to recreate your ui project based on v2 model.

you cannot convert v4 FE project to V2 FE by just changing a odatamodel.

0 Kudos
Is it possiible to recreate Fiori Elements project using OData V2, or I can do only Freestyle development
junwu
Active Contributor
0 Kudos
yes, you can recreate.
0 Kudos
I created a fiori elements app, and selected Local CAP Project as backend, still it is falling back to OData V4 version. Any clue how to fix it