Skip to content

Conversation

@jahow
Copy link
Contributor

@jahow jahow commented Apr 4, 2019

PR checklist

  • Read the contribution guidelines.
  • 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, ./bin/openapi3/{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\.
  • Filed the PR against the correct branch: master, 3.4.x, 4.0.x. Default: master.
  • Copied the technical committee to review the pull request if your PR is targeting a particular programming language.

Description of the PR

The removeModelSuffixIfNecessary method of TypeScriptAngularClientCodegen has been reworked to also remove prefix/suffix defined using --model-name-prefix|suffix options.

I have added a test to document the new behaviour.

Fixes #2560.

These will be removed as well when generating import path & model file names.
Previously only the language-specific `modelSuffix` was removed.
@macjohnny
Copy link
Member

cc @TiFu (2017/07) @taxpon (2017/07) @sebastianhaas (2017/07) @kenisteward (2017/07) @Vrolijkx (2017/09) @macjohnny (2018/01) @nicokoenig (2018/09) @topce (2018/10)

Copy link
Member

@macjohnny macjohnny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
thanks for the test!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG][typescript-angular] Incorrect import path when using prefix/suffix for model names

3 participants