Hi All,
This Blog is regarding the exposing the SAP CAP service as V2 or V4 OData Service as per the requirment.
As you know, Smart Controls are only compatible with OData V2 [Reference].In order to use Smart Controls, the OData metadata document needs to contain a few key elements such as the "sap:" annotations. So for such requirements we can use the OData V2 Adapter for cds.
1) Create the SAP CAP Project using template.
2) Add the Service and Data definition in SRV and DB folder respectively
or you can select the Minimal sample to add the sample content for your project
3) install the adapter package to your project "npm add @cap-js-community/odata-v2-adapter"
4) Add the Plugin to package.json
5) execute the project and you will find the service being exposed in V2 and V4.
Hope this is helpful for you !!
Reference:
1) Serving OData APIs | CAPire (cloud.sap)
2) @cap-js-community/odata-v2-adapter - npm (npmjs.com)
Thanks,
Omkar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
20 | |
9 | |
9 | |
7 | |
5 | |
5 | |
4 | |
3 | |
3 | |
3 |