cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Fiori Elements UI not using OData V2 : CAP

akhthaaralibadhusha
Participant
0 Kudos
1,421

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

@Sisn/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.

Accepted Solutions (0)

Answers (2)

Answers (2)

junwu
SAP Champion
SAP Champion

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.

akhthaaralibadhusha
Participant
0 Kudos
Is it possiible to recreate Fiori Elements project using OData V2, or I can do only Freestyle development
junwu
SAP Champion
SAP Champion
0 Kudos
yes, you can recreate.
akhthaaralibadhusha
Participant
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
Former Member
0 Kudos

Hello @akhthaaralibadhusha 

If you are creating the new fiori elements application using the generator, it will fallback to OData v4. You can try to change the new application properties to make it work, but I would personally deploy this CAP backend first and then create a new fiori elements based on the OData V2 endpoint (using the "Connect to a system" or "Connect to an OData Service" option in the generator).

Best regards,
Rafael