ionos-cloud / sdk-nodejs

Apache License 2.0
1 stars 0 forks source link

datacentersGet returns nothing #6

Closed DanielRuf closed 2 years ago

DanielRuf commented 2 years ago

Description

I have wondered why DataCentersApi.datacentersGet() did nothing and returns nothing.

dcApi.datacentersGet().then((response: any, error: any) => log.debug(error));

SDK version:

6.1.1

How to Reproduce

            // initialize new SDK instance
            const dcApi = new sdk.DataCentersApi(sdkConfig);
            dcApi.datacentersGet().then((response: any) => log.debug(error));

Error and Debug Output

DanielRuf commented 2 years ago

Trying some workarounds. Closing until I can provide a simple reproducible test case.

DanielRuf commented 2 years ago

Resolved, we had to use import instead of require. Maybe you want to extend the documentation with import * as sdk from '@ionos-cloud/sdk-nodejs'; for ES6 projects.

mimihalescu commented 2 years ago

Hello! Thank you for bringing this up! We'll do some tests on ES6 projects too and update the documentation where needed.