diff --git a/modules/openapi-generator/src/main/resources/cpp-qt5-qhttpengine-server/apirequest.cpp.mustache b/modules/openapi-generator/src/main/resources/cpp-qt5-qhttpengine-server/apirequest.cpp.mustache index b9e79767a20d..08be3dd793e5 100644 --- a/modules/openapi-generator/src/main/resources/cpp-qt5-qhttpengine-server/apirequest.cpp.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-qt5-qhttpengine-server/apirequest.cpp.mustache @@ -75,10 +75,15 @@ void {{classname}}Request::{{nickname}}Request({{#hasPathParams}}{{#pathParams}} {{/isListContainer}} {{^isListContainer}} {{^isMapContainer}} - {{#isPrimitiveType}} + {{#isPrimitiveType}}{{^isFreeFormObject}} {{{dataType}}} {{paramName}}; ::{{cppNamespace}}::fromStringValue(QString(socket->readAll()), {{paramName}}); - {{/isPrimitiveType}} + {{/isFreeFormObject}}{{/isPrimitiveType}} + {{#isFreeFormObject}} + {{{dataType}}} {{paramName}}; + QJsonDocument resObject = QJsonDocument::fromJson(socket->readAll()); + ::{{cppNamespace}}::fromJsonValue({{paramName}}, resObject.object()); + {{/isFreeFormObject}} {{/isMapContainer}} {{#isMapContainer}} QJsonDocument doc;