openapi-typescript-codegen
openapi-typescript-codegen copied to clipboard
Add model postfix
Closes #983
I implemented the option to add a suffix to the generated model names. To stay aligned with the already exisiting parameter --postifx, I named it --postfixModels and renamed --postfix to --postfixServices. The --postfix parameter is still supported so this is not a breaking change. I just marked it as deprecated in the docs and the --help command so the --postfixServices parameter should be prefered over it.
In order for this feature to be as unintrusive as possible, I implemented it by renaming the imported model inside index.ts. This way all logik about the generated models stays the same, just the clash of model names inside index.ts can be prevented.