Closed NickPak closed 3 years ago
Hi @NickPak
Thank you for your working in C++ ! The code is generated by openapi-generator/c-libcurl https://github.com/OpenAPITools/openapi-generator, so your change will be overwritten by next re-generating.
I think it's better to add these keywords into setReservedWordsLowerCase
in https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CLibcurlClientCodegen.java
Although setReservedWordsLowerCase
is used to hold the C keyword, I think adding C++ keyword to it is OK.
@ityuhui Thanks!
Please try to commit your PR into openapi-generator, after your PR is merged, I can work with you to re-generate the c client code here. And then it will work with C++.
Any question, feel free to append here.
Hi @ityuhui I have committed it. Thanks very much!
Hi @NickPak
I have merged your change https://github.com/OpenAPITools/openapi-generator/pull/8205 and re-generate the client code by this PR https://github.com/kubernetes-client/c/pull/45. So I think the C client can be compiled by C++ compiler now, could you please fetch the latest code to try ? Thanks.
Hi @ityuhui It works fine for me! Thanks very much!
Thank you for your contribution for C++ support !
In C++, there are many keyword conflicts with variable names. I‘m going to commit a PR for this, which will make the following changes:
namespace
=>name_space
template
=>template_
operator
=>operator_
export
=>export_
Does it follow your code style?