Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Odata V2 adapter for CAP service #68

Closed
shyamkumarc opened this issue May 5, 2020 · 2 comments
Closed

Odata V2 adapter for CAP service #68

shyamkumarc opened this issue May 5, 2020 · 2 comments

Comments

@shyamkumarc
Copy link

When i try to use Odata V2 adapter( github.com/gregorwolf/SAP-NPM-API-collection/tree/master/apis/cds-odata-v2-adapter-proxy ) , the V2 link gives an internal server error response. I chose the "CDS combined backend (Node.js) - custom" for my use case - when i run index.js , it works fine for V4 , but for the V2 path it gives internal server error. A look at the log for the service shows an error as follows: "Error: CDS compilation failed\ncat-service.cds:1:40-58: Error: Cannot find local module '../db/data-model' .

I'm sharing a Github link to my sample project here : https://github.com/shyamkumarc/CAP_POC

Please guide.

@gregorwolf
Copy link
Contributor

Please adjust your project to use the generated csn.json as I did in v2server.js#L9. At runtime in CF cds doesn't have access to the db folder that contains the DB schema. So you have to point the proxy to a static resource that is available in srv.

@shyamkumarc
Copy link
Author

Thanks a Lot @gregorwolf ! it worked 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants