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

cpprest runtime bug with form parameters #6522

Closed
WendellDuncan opened this issue Sep 20, 2017 · 1 comment
Closed

cpprest runtime bug with form parameters #6522

WendellDuncan opened this issue Sep 20, 2017 · 1 comment

Comments

@WendellDuncan
Copy link
Contributor

Description

After using the cpprest c++ language target, I was having runtime crashes.
I tracked it down to the ApiClient.cpp code. If there were no form parameters, it was setting the
html body to a badly initialized state.

I am a C++ programmer and am not well versed in html, but a check for the existence of
any form parameters and not setting the body if there are none did fix my crash.
Perhaps an alternate implementation
of a good default would also be a solution.

Swagger-codegen version

This is running against the head of the 3.0 branch

Swagger declaration file content or url

The moustache produces the same code for any json swagger input.
The generated file is ApiClient.cpp. Usually around line 139 -- can vary by one or
two lines if different namespaces from the default are used.

Command line used for generation

java -jar swagger-codegen-cli.jar generate -i ~/hoops/Hoops/VisualizePmi/Modules/cpprest-cad-api/cruiser-dev-cad-api.json -o /tmp/cad -l cpprest -c ~/hoops/Hoops/VisualizePmi/Modules/cpprest-cad-api/swagger-config.json

Steps to reproduce

Generate a cpprest target. The ApiClient.cpp will have the code in it.

Related issues/PRs
Suggest a fix/enhancement

I will open a pull request.

@wing328
Copy link
Contributor

wing328 commented Sep 24, 2017

I believe this is closed with #6523

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

2 participants