[REQ][ASPNETCORE]Allow multiple naming conventions
Created by: bartz-kibidev
Description
The swagger spec (OAS 3.0) that I use to generate my .NET Core server stubs contains many instances of variable names or attributes with hyphens and/or underscores, e.g., "X-Correlation-Id", "access_token", etc... C# does not allow hyphens in variable names, of course, and so the generator resolves these names to camelCase. This is a problem for me when I use NSwag to generate my client code and the names are, more accurately, resolved to snake_case. As a workaround, I have made a script to be run post-generation which replaces the names to be formatted how I want them.
openapi-generator version
3.3.4
OpenAPI declaration file content or url
Command line used for generation
java -jar .\modules\openapi-generator-cli\target\openapi-generator-cli.jar generate -i " + $jsonFile + "
-g aspnetcore -o " + $OutputDir + "
-c " + $configFile + " `-t " + $templates
Steps to reproduce
Related issues/PRs
Suggest a fix/enhancement
I think allowing for multiple naming conventions in the c# generators could be a great improvement for the sake of flexibility in code generation.