openapi-generator icon indicating copy to clipboard operation
openapi-generator copied to clipboard

[BUG] Typescript - Multiple imports missing comma

Open GregTheGreek opened this issue 5 years ago • 5 comments

Bug Report Checklist

Description

The following yaml file has multiple instances where two exports are import into the same file: eg:

import { this that } from "./example.ts";

Problem being, the comma is missing in the above example, for instance the correctly generated code should be:

import { this, that } from "./example.ts";
openapi-generator version

Latest npm version

Steps to reproduce
  1. Download the code snippet above in the description
  2. npx @openapitools/openapi-generator-cli generate -i beacon-node-oapi.yaml -g typescript-node -o ./generated-source
  3. Navigate to generated-typescript/api/beaconApi.ts line 37. You should see:
import { String  AnyType } from '../model/string  AnyType';

There are other instances of this, but this one stands out.

GregTheGreek avatar Aug 07 '20 03:08 GregTheGreek

👍 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.

auto-labeler[bot] avatar Aug 07 '20 03:08 auto-labeler[bot]

Have you tested with the latest master (e.g. snapshot or build from master) to see if it's still an issue?

wing328 avatar Aug 08 '20 16:08 wing328

I have not. I only ran with npm

GregTheGreek avatar Aug 08 '20 18:08 GregTheGreek

Does anyone have an update/info on this issue?

filipvh avatar Jun 22 '21 07:06 filipvh

same problem here

heartlex avatar Oct 13 '22 09:10 heartlex