-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[cpp] Sanitize identifier names #631
[cpp] Sanitize identifier names #631
Conversation
Thanks for the PR but your commit (as shown in the Commits tab) is not linked to your Github account, which means this PR won't count as your contribution in https://github.com/OpenAPITools/openapi-generator/graphs/contributors. Let me know if you need help fixing it. |
47e4471
to
f2694d6
Compare
Fixed :) |
@Jauler |
Hey,
|
7b71a23
to
264a864
Compare
@Jauler thanks for cleaning up the duplicated code. Please also run the shell script (./bin/) or Windows batch files (.\bin\windows) to update the Petstore samples for the affected generators (e.g. Tizen) to see if there're any changes to the samples as a result of the cleanup. |
…nding AbstractCppCodegen class.
Good Catch! I believe that making tizen extend AbstractCppCodegen is better suited for separate PR and adding that I have no tizen setup, I would like to be on the safe side, therefore I simply reverted changes done to tizen. |
I will also remove the override in the Qt5 Server subclass which is extending the |
* [cpp] Sanitize identifier names * Remove duplicated methods in cpp code generator subclasses. * Fix unintended codegen differences in cpp tizen caused by it not extending AbstractCppCodegen class.
PR checklist
./bin/
to update Petstore sample so that CIs can verify the change. (For instance, only need to run./bin/{LANG}-petstore.sh
and./bin/security/{LANG}-petstore.sh
if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in.\bin\windows\
.master
,3.1.x
,4.0.x
. Default:master
.Description of the PR
Proposed fix for #621. Add cpp identifier sanitizing to AbstractCppCodegen.java and provide those functions for other cpp codegens if needed.
NOTE: After adding to AbstractCppCodegen.java it is possible to remove some overriden functions from other (than cpprestsdk) cpp generators, but I wanted to avoid that as I have no setup for testing those.
@ravinikam (2017/07) @stkrwork (2017/07) @fvarose (2017/11) @etherealjoy (2018/02) @MartinDelille (2018/03)