When running openapi-generator generate -i https://petstore3.swagger.io/api/v3/openapi.json -g typescript-node -o out -c config.json
with the config.json file:
{
"npmName": "@swagger/typescript-fetch-petstore",
"npmVersion": "1.0.0",
"npmRepository": "https://skimdb.npmjs.com/registry",
"snapshot": false,
"supportsES6": true
}
it generates the following code which is not valid esm code:
import localVarRequest = require('request');
import http = require('http');
4.2.0
馃憤 Thanks for opening this issue!
馃彿 I have applied any labels matching special text in your issue.
The team will review the labels and make any necessary changes.
@DanielRuf would you like to implement a fix?
Just for your information: i ran into the same problem and fixed this issue in https://github.com/laubfall/openapi-generator/tree/typescript-node_mixes_require_and_import_4656 . PR is on its way.
Most helpful comment
Just for your information: i ran into the same problem and fixed this issue in https://github.com/laubfall/openapi-generator/tree/typescript-node_mixes_require_and_import_4656 . PR is on its way.