aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/jobs/{{base}}.cpp.mustache14
-rw-r--r--lib/jobs/{{base}}.h.mustache2
2 files changed, 8 insertions, 8 deletions
diff --git a/lib/jobs/{{base}}.cpp.mustache b/lib/jobs/{{base}}.cpp.mustache
index b8532c51..5e94dcf0 100644
--- a/lib/jobs/{{base}}.cpp.mustache
+++ b/lib/jobs/{{base}}.cpp.mustache
@@ -3,8 +3,8 @@
{{^allModels}}
#include "converters.h"
{{/allModels}}{{#operations}}
-{{#producesNotJson?}}#include <QtNetwork/QNetworkReply>
-{{/producesNotJson?}}#include <QtCore/QStringBuilder>
+{{#producesNonJson?}}#include <QtNetwork/QNetworkReply>
+{{/producesNonJson?}}#include <QtCore/QStringBuilder>
{{/operations}}
using namespace QMatrixClient;
{{#models.model}}{{^trivial?}}
@@ -88,8 +88,8 @@ QUrl {{camelCaseOperationId}}Job::makeRequestUrl(QUrl baseUrl{{#allParams?}}, {{
{{^required?}}{{#string?}} if (!{{paramName}}.isEmpty())
{{/string?}}{{/required?}} _data.insert("{{baseName}}", toJson({{paramName}}));{{/bodyParams}}
setRequestData(_data);{{/inlineBody}}
-{{/bodyParams?}}{{#producesNotJson?}} setExpectedContentTypes({ {{#produces}}"{{_}}"{{#@join}}, {{/@join}}{{/produces}} });
-{{/producesNotJson?}}}{{!<- mind the actual brace}}
+{{/bodyParams?}}{{#producesNonJson?}} setExpectedContentTypes({ {{#produces}}"{{_}}"{{#@join}}, {{/@join}}{{/produces}} });
+{{/producesNonJson?}}}{{!<- mind the actual brace}}
{{# responses}}{{#normalResponse?}}{{#allProperties?}}
{{camelCaseOperationId}}Job::~{{camelCaseOperationId}}Job() = default;
{{# allProperties}}
@@ -97,13 +97,13 @@ QUrl {{camelCaseOperationId}}Job::makeRequestUrl(QUrl baseUrl{{#allParams?}}, {{
{
return d->{{paramName}};
}
-{{/ allProperties}}{{#producesNotJson?}}
+{{/ allProperties}}{{#producesNonJson?}}
BaseJob::Status {{camelCaseOperationId}}Job::parseReply(QNetworkReply* reply)
{
{{#headers}}d->{{paramName}} = reply->rawHeader("{{baseName}}"); {{! We don't check for required headers yet }}
{{/headers}}{{#properties}}d->{{paramName}} = reply;{{/properties}}
return Success;
-}{{/ producesNotJson?}}{{^producesNotJson?}}
+}{{/ producesNonJson?}}{{^producesNonJson?}}
BaseJob::Status {{camelCaseOperationId}}Job::parseJson(const QJsonDocument& data)
{
auto json = data.object();
@@ -112,5 +112,5 @@ BaseJob::Status {{camelCaseOperationId}}Job::parseJson(const QJsonDocument& data
"The key '{{baseName}}' not found in the response" };
{{/required?}}d->{{paramName}} = fromJson<{{dataType.name}}>(json.value("{{baseName}}"));
{{/ properties}}return Success;
-}{{/ producesNotJson?}}
+}{{/ producesNonJson?}}
{{/allProperties?}}{{/normalResponse?}}{{/responses}}{{/operation}}{{/operations}}
diff --git a/lib/jobs/{{base}}.h.mustache b/lib/jobs/{{base}}.h.mustache
index 63aa53e7..12633604 100644
--- a/lib/jobs/{{base}}.h.mustache
+++ b/lib/jobs/{{base}}.h.mustache
@@ -57,7 +57,7 @@ namespace QMatrixClient
{{>maybeCrefType}} {{paramName}}() const;{{/allProperties}}
protected:
- Status {{#producesNotJson?}}parseReply(QNetworkReply* reply){{/producesNotJson?}}{{^producesNotJson?}}parseJson(const QJsonDocument& data){{/producesNotJson?}} override;
+ Status {{#producesNonJson?}}parseReply(QNetworkReply* reply){{/producesNonJson?}}{{^producesNonJson?}}parseJson(const QJsonDocument& data){{/producesNonJson?}} override;
private:
class Private;