[BUG][C] errors in supporting additionalProperties in C client
Created by: michelealbano
Bug Report Checklist
- [ X ] Have you provided a full/minimal spec to reproduce the issue?
- [ X ] Have you validated the input using an OpenAPI validator (example)?
- [ X ] What's the version of OpenAPI Generator used?
- [ X ] Have you search for related issues/PRs?
- [ X ] What's the actual output vs expected output?
Description
I tried to compile the declaration reported below. The results was:
/mnt/hgfs/shared/clientC/model/service_query_form_dto.c:25:15: error: ‘localKeyValue’ undeclared (first use in this function); did you mean ‘localMapKeyPair’? free (localKeyValue->key); ^~~~~~~~~~~~~ localMapKeyPair
openapi-generator version
commit 4543c210 (grafted, HEAD -> master, origin/master, origin/HEAD) Author: sullis github@seansullivan.com Date: Sat Oct 26 21:10:55 2019 -0700
OpenAPI declaration file content or url
https://gist.github.com/michelealbano/4ecf5b628a5d7eb305a3eea5da16ff4a
Command line used for generation
java -jar openapi-generator/modules/openapi-generator-cli/target/openapi-generator-cli.jar generate -g c -i cproblems.json -o clientC --additional-properties=swaggerDocketConfig=true
Steps to reproduce
java -jar openapi-generator/modules/openapi-generator-cli/target/openapi-generator-cli.jar generate -g c -i cproblems.json -o clientC --additional-properties=swaggerDocketConfig=true cd clientC mkdir build cd build cmake .. make
Related issues/PRs
N/A
Suggest a fix
In model-body.mustache, change "localMapKeyPair" on line 258 into "localKeyValue".