We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
When running openapi-generator generate -i https://petstore3.swagger.io/api/v3/openapi.json -g typescript-node -o out -c config.json
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
The text was updated successfully, but these errors were encountered:
👍 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.
Sorry, something went wrong.
@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.
PR: #6947
Successfully merging a pull request may close this issue.
Bug Report Checklist
Description
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:
it generates the following code which is not valid esm code:
openapi-generator version
4.2.0
OpenAPI declaration file content or url
Command line used for generation
Steps to reproduce
Related issues/PRs
Suggest a fix
The text was updated successfully, but these errors were encountered: