Bug Report Checklist
Description
The Kotlin code generator currently sanitizes model names using the DefaultCodeGen.specialCharReplacement map, which deviates from how other code generators generate model names (such as java) and results in Kotlin model and file names being generated with unexpected words interposed: MyMinusApiMinusRequestMinusObject.
That said, this behavior is validated in the AbstractKotlinCodegenTest tests, so I was wondering if there's any particular reason to break the convention for Kotlin? If not I'd love to submit a PR to change this!
openapi-generator version
Version 5.1.1 (master)
Steps to reproduce
- Copy the AbstractJavaCodegenTest#convertModelName tests to the AbstractKotlinCodegenTest#convertModelName tests
- Run the unit tests;
- Validate that they fail.
Related issues/PRs
Suggest a fix
This is an easy fix (replace this line with a call to sanitizeName(name)). I'm happy to submit a PR if there wasn't any particular reason to deviate from convention here!
cc @jimschubert @Zomzog (please let me know if I should be CC-ing anyone else)
Bug Report Checklist
Description
The Kotlin code generator currently sanitizes model names using the DefaultCodeGen.specialCharReplacement map, which deviates from how other code generators generate model names (such as java) and results in Kotlin model and file names being generated with unexpected words interposed:
MyMinusApiMinusRequestMinusObject.That said, this behavior is validated in the AbstractKotlinCodegenTest tests, so I was wondering if there's any particular reason to break the convention for Kotlin? If not I'd love to submit a PR to change this!
openapi-generator version
Version 5.1.1 (master)
Steps to reproduce
Related issues/PRs
Suggest a fix
This is an easy fix (replace this line with a call to sanitizeName(name)). I'm happy to submit a PR if there wasn't any particular reason to deviate from convention here!
cc @jimschubert @Zomzog (please let me know if I should be CC-ing anyone else)