How to build an odata service in node by json service

6k Views Asked by At

We have a requirement of reading the service and convert it into odata. Our target system only understands odata and the source cannot deliver odata. So we are trying to build node service to facilitate the same.

I tried to use CAP (https://cap.cloud.sap/docs/get-started/) but it seems it can only work with persisted data.

It would be really helpful if you can provide any insight or any guidance for the same. We are aware that all odata operations we have to handle it at node middle layer.

2

There are 2 best solutions below

0
On BEST ANSWER

I was able to do this by using existing npm package - https://www.npmjs.com/package/simple-odata-server.

Regards, Ammy

0
On

For CAP, you can register on handlers for entities to override the standard behaviours.