Created by: amakhrov
Fixes #2976 (closed)
Summary
- Generators without runtime models conversion use "original" property naming by default. It's still possible to change it via cli options - might be helpful when used together with customized templates. The cli option description has been modified to provide some more context.
- Generators with runtime conversion (typescript-fetch, typescript-node, typescript-reduxquery) keep using "camelCase"
Implementation notes
- I decoupled
toVarNamefromtoParamName. Former respects themodelPropertyNaming, while latter keeps always using camelCase. - Refactoring: use an enum instead of string for
modelPropertyNaming. It now better resemblesenumPropertyNaming. - No samples have changed. It's because
petstore.yamlhas all model vars defined in camelCase - which meansoriginalnaming (new) is effectively the same ascamelCase(old).
PR checklist
-
Read the contribution guidelines. -
Run the shell script(s) under ./bin/(or Windows batch scripts under.\bin\windows) to update Petstore samples related to your fix. This is important, as CI jobs will verify all generator outputs of your HEAD commit, and these must match the expectations made by your contribution. You only need to run./bin/{LANG}-petstore.sh,./bin/openapi3/{LANG}-petstore.shif updating the code or mustache templates for a language ({LANG}) (e.g. php, ruby, python, etc). -
File the PR against the correct branch: master,4.3.x,5.0.x. Default:master. -
Copy the technical committee to review the pull request if your PR is targeting a particular programming language.
@TiFu (2017/07) @taxpon (2017/07) @sebastianhaas (2017/07) @kenisteward (2017/07) @Vrolijkx (2017/09) @macjohnny (2018/01) @nicokoenig (2018/09) @topce (2018/10) @akehir (2019/07) @petejohansonxo (2019/11)