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

duplicate imports on generated models in typescript-axios exported files #4636

Open
ali-arjmandi opened this issue Dec 3, 2023 · 4 comments

Comments

@ali-arjmandi
Copy link

ali-arjmandi commented Dec 3, 2023

Q&A (please complete the following information)

  • OS: macOS
  • Browser: chrome
  • Swagger/OpenAPI version: OpenAPI 3.0

Hi, I'm trying to export my swagger JSON as typescript-axios. I exported my JSON 2 months ago and there were no problem. now I want to export it again. but this time in the models directory, inside ts files, the classes are imported twice. It's cause typescript errors.

as example:
import { AccountContractDto } from './account-contract-dto'; import { AccountContractDto, } from ".";

@crichardson05
Copy link

I am having the same issue. swagger-codegen version 3.0.50 does not have the issue, but I am receiving these errors with 3.0.51.
import { SubscriptionDetailsDto } from './subscription-details-dto';
import {
SubscriptionDetailsDto,
} from ".";

@42geek
Copy link

42geek commented Dec 19, 2023

Same for me, I'm getting duplicate imports on generated models in typescript.

@Net-18K
Copy link

Net-18K commented Dec 19, 2023

I also encountered the same problem and it was very annoying. I had to delete it manually every time.
It seems that the model was imported twice.
image

@fmockers
Copy link

could be related to swagger-api/swagger-codegen#12300

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

5 participants