Closed pspeter closed 7 years ago
@bloody-orange there's an option change the variable naming:
modelPropertyNaming
Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name (Default: camelCase)
Ref: java -jar modules/swagger-codegen-cli/target/swagger-codegen-cli.jar config-help -l typescript-angular2
@bloody-orange there's also another PR to use an ObjectSerializer to handle mapping of the JSON key name: https://github.com/swagger-api/swagger-codegen/pull/4264
Please kindly it test out by runnning:
git checkout -b TiFu-typescriptPropertyNamingFix 2.3.0
git pull https://github.com/TiFu/swagger-codegen.git typescriptPropertyNamingFix
@wing328 thanks for the quick response The config works perfectly, thanks again.
@bloody-orange no problem. Let us know if you've further feedback.
(we've just added Swagger Codegen to ProductHunt: https://www.producthunt.com/posts/swagger-codegen, pleae upvote found Swagger Codegen useful)
Description
The models generated by the cli always have attributes whose first character is lowercase. My properties all start with an uppercase character though, and they are also written like that in the API and the swagger doc.
Swagger-codegen version
2.2.1
Swagger declaration file content or url
generates:
Command line used for generation
CMD: