swagger-api / swagger-api/swagger-codegen

[typescript-angular] Incorrect handling of model-name-prefix and model-name-suffix

Open
#7,866 13 comments 2 reactions 1 assignee View on GitHub

@HugoMario is already working on this.

Since Sep 7, 2019.

Dominant language
Mustache
Stars
17.8k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

Description

When the --model-name-prefix or --model-name-suffix are used, the model filename
includes the prefix/suffix, but the import filename includes them twice.

For example, if we use "--model-name-prefix swg" and the model is "pet", the resulting
model filename is "SwgPet.ts", but corresponding import is:

import { SwgSwgPet} from '../model/SwgSwgPet';

Swagger-codegen version

ref: refs/heads/master

Swagger declaration file content or url
Command line used for generation
Steps to reproduce

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

Related issues/PRs

#7865

Suggest a fix/enhancement

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.