You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
The text was updated successfully, but these errors were encountered: