Bug Report Checklist
Description
When using C-libcurl generator to generate kubernetes API, some field names are keywords of C programming language, e.g.
object_ *default;
list_t *enum;
And some field names include "-", e.g.
int x-kubernetes-int-or-string;
The source code fails to compile due to these field names.
openapi-generator version
master
OpenAPI declaration file content or url
https://raw.githubusercontent.com/kubernetes/kubernetes/master/api/openapi-spec/swagger.json
Command line used for generation
mvn clean package
java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate -i https://raw.githubusercontent.com/kubernetes/kubernetes/master/api/openapi-spec/swagger.json -g c -o ../c_k8s_api_client
Steps to reproduce
- generate the c api client by the above command
- check the file "c_k8s_api_client/model/v1_json_schema_props.h"
Related issues/PRs
#3970
Suggest a fix
does openapi-generator provide a method to escape the name of field in a struct ?