WillEastbury / odata-openapi

Worked example of wrapping the OASIS OData TC in a simple JS SPA. With some additional extensions of post-processing the OpenAPI content to tailor SAP Gateway conversions for either Azure APIM import or for use with PowerPlatform.
https://aka.ms/ODataOpenAPI
Other
1 stars 1 forks source link

[BUG] Creation of SDK for SAP S/4HANA Cloud - Customer Material (A2X) API fails #4

Open gregorwolf opened 1 year ago

gregorwolf commented 1 year ago

Describe the bug

I've tried to create the TypeScript SDK for the SAP S/4HANA Cloud - Customer Material (A2X) API. But it fails with this error in the POST request to https://convert.odata-openapi.net/api/CodeGen:

internal/modules/cjs/loader.js:905
  throw err;
  ^

Error: Cannot find module 'C:\home\c:\site\wwwroot\node_modules\autorest\entrypoints\app.js'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:902:15)
    at Function.Module._load (internal/modules/cjs/loader.js:746:27)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:75:12)
    at internal/main/run_main_module.js:17:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

To Reproduce

Steps to reproduce the behavior:

  1. Go to SAP S/4HANA Cloud - Customer Material (A2X) and download the EDMX from the API specification
  2. Open https://convert.odata-openapi.net/# and switch to SDK Generator
  3. Paste the EDMX content into 'Manual Input of OData Definition'
  4. Click Generate SDK and choose Typescript
  5. See error

Expected behavior

No error should occur.

Desktop (please complete the following information):

OData Payload for diagnosis

As the API Metadata can only be downloaded after authentication at api.sap.com I can't provide it directly here.

MartinPankraz commented 4 months ago

Thanks for pointing out. Would you consider the SAP Cloud SDK for Node instead?

gregorwolf commented 4 months ago

For the moment that is of course the best alternative if I need support for TypeScript or Java.

MartinPankraz commented 4 months ago

Ok, but you would favor the converter still?