Skip to content

Commit

Permalink
Add support for free form requests (OpenAPITools#2288)
Browse files Browse the repository at this point in the history
  • Loading branch information
etherealjoy authored and wing328 committed Mar 8, 2019
1 parent ab8ee71 commit 3739584
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 3739584

Please sign in to comment.