Skip to content
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

[BUG][C] errors in supporting additionalProperties in C client #4289

Closed
michelealbano opened this issue Oct 28, 2019 · 1 comment
Closed

Comments

@michelealbano
Copy link
Contributor

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 4543c21 (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".

@auto-labeler
Copy link

auto-labeler bot commented Oct 28, 2019

👍 Thanks for opening this issue!
🏷 I have applied any labels matching special text in your issue.

The team will review the labels and make any necessary changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant