diff options
Diffstat (limited to 'jobs/{{base}}.cpp.mustache')
-rw-r--r-- | jobs/{{base}}.cpp.mustache | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/jobs/{{base}}.cpp.mustache b/jobs/{{base}}.cpp.mustache index f3a6dc59..31b867fa 100644 --- a/jobs/{{base}}.cpp.mustache +++ b/jobs/{{base}}.cpp.mustache @@ -2,7 +2,7 @@ #include "{{filenameBase}}.h" -{{^models}}#include "jobs/converters.h"{{/models}} +{{^models}}#include "converters.h"{{/models}} {{#operations}}#include <QtCore/QStringBuilder>{{/operations}} using namespace QMatrixClient; @@ -35,7 +35,7 @@ class {{camelCaseOperationId}}Job::Private {{/ properties?}}{{/normalResponse?}}{{/responses}} {{camelCaseOperationId}}Job::{{camelCaseOperationId}}Job({{#allParams}}{{#avoidCopy?}}const {{dataType}}&{{/avoidCopy?}}{{^avoidCopy?}}{{dataType}}{{/avoidCopy?}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) : BaseJob(HttpVerb::{{#@cap}}{{#@tolower}}{{httpMethod}}{{/@tolower}}{{/@cap}}, "{{camelCaseOperationId}}Job", - basePath{{#pathParts}} % {{part}}{{/pathParts}}, + basePath{{#pathParts}} % {{.}}{{/pathParts}}, Query {{^queryParams}}{ }{{/queryParams}}{{#queryParams?}}{ {{#queryParams}}{ "{{baseName}}", toJson({{paramName}}).toString() }{{#hasMore}}, {{/hasMore}}{{/queryParams}} @@ -69,7 +69,7 @@ BaseJob::Status {{camelCaseOperationId}}Job::parseJson(const QJsonDocument& data {{# properties}}{{#required?}}if (!json.contains("{{paramName}}")) return { JsonParseError, "The key '{{paramName}}' not found in the response" };{{/required?}} - d->{{paramName}} = fromJson<{{dataType}}>(json.value("{{paramName}}")); + d->{{paramName}} = fromJson<{{dataType}}>(json.value("{{baseName}}")); {{/ properties}} return Success; }{{/ returnFile?}} |