swagger-codegen icon indicating copy to clipboard operation
swagger-codegen copied to clipboard

Fix #7866: Incorrect handling of --model-name-prefix/suffix (typescri…

Open univac490 opened this issue 7 years ago • 1 comments

PR checklist

  • [x] Read the contribution guidelines.
  • [x] Ran the shell script under ./bin/ to update Petstore sample so that CIs can verify the change. (For instance, only need to run ./bin/{LANG}-petstore.sh and ./bin/security/{LANG}-petstore.sh if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in .\bin\windows.
  • [x] Filed the PR against the correct branch: 3.0.0 branch for changes related to OpenAPI spec 3.0. Default: master.
  • [x] Copied the technical committee to review the pull request if your PR is targeting a particular programming language. @TiFu @taxpon @sebastianhaas @kenisteward @Vrolijkx @macjohnny

Description of the PR

Fix import in *.service.ts when using --model-name-prefix or --model-name-suffix

java -jar swagger-codegen-cli.jar generate -l typescript-angular --model-name-prefix swg

Before:

import { SwgSwgError } from '../model/swgSwgError';

After:

import { SwgError} from '../model/swgError';

univac490 avatar Mar 18 '18 23:03 univac490

awesome, this PR will fix my issues

gummibjorn avatar Aug 29 '18 11:08 gummibjorn