Open thomas-lucas1985 opened 4 years ago
👍 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.
Would you like to implement a fix for this?
Would you like to implement a fix for this?
Hi @macjohnny
We're using the codegen for professional reasons and at the time being, we're quite on a tight schedule. I'm affraid I'm not familiar with the project and I'm lacking the time to get familiar. So I would prefer not.
Thanks
if anyone wants to fix this, I think the problem is here https://github.com/OpenAPITools/openapi-generator/blob/9a1ff9bf051221c5e53ba811052e1a4e16c40bef/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAngularClientCodegen.java#L593-L608
Description
When generating code, I'm passing the --model-name-prefix "I" option in my command. This is generating all my models with the prefix 'I'. This is working fine for all my models except 1. The name of the model is Invoice and the generated model in code is IInvoice. This is correct, but the generated file is 'nvoice.ts'. It seems that in this case, the i is dropped from my filename. This gives an error, because in the generated service file, the import is as follows: import { IInvoice } from '../model/invoice'
openapi-generator version
version 4.2.0
Steps to reproduce
Generate a model which has a name starting with the same letter as the --model-name-prefix value
Suggest a fix
generated filename should be: invoice.ts