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
If you have a model definition with additionalProperties the generated code could not be compiles. You can see in generated code below that in the header file the variable is defined as QMap<QString, QString*>* values. In the CPP class file in there are two errors:
in method init it is tried to instanciate the value with values = new QMap<QString, QString>();. It has to be values = new QMap<QString, QString*>;
in method cleanup it is used QList<QString*>* arr = values; but is should be QMap<QString, QString*>* arr = values;
Description
If you have a model definition with additionalProperties the generated code could not be compiles. You can see in generated code below that in the header file the variable is defined as
QMap<QString, QString*>* values
. In the CPP class file in there are two errors:init
it is tried to instanciate the value withvalues = new QMap<QString, QString>();
. It has to bevalues = new QMap<QString, QString*>;
cleanup
it is usedQList<QString*>* arr = values;
but is should beQMap<QString, QString*>* arr = values;
Swagger-codegen version
2.2.3 and current master
Swagger declaration file content or url
Command line used for generation
java -jar swagger-codegen-cli-2.2.3.jar generate -l qt5cpp -i swagger.json -o PathToFolder
Steps to reproduce
generate code with the swagger definition in this issue
Generated source code
Related issues/PRs
maybe #5876
Suggest a fix/enhancement
generate code like described at the beginning of the issue
The text was updated successfully, but these errors were encountered: