diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2017-09-08 22:39:42 +0900 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2017-09-08 22:39:42 +0900 |
commit | 9852ef0b8aa1033328b313f6f78232f5670f00df (patch) | |
tree | df1f852f49cfe10151c52012f8ce2160a4e6ab19 /jobs/{{base}}.cpp.mustache | |
parent | c87b4d9dcaacd932cbb7e4a9dca00c55b6338eef (diff) | |
download | libquotient-9852ef0b8aa1033328b313f6f78232f5670f00df.tar.gz libquotient-9852ef0b8aa1033328b313f6f78232f5670f00df.zip |
Prepend basePath to produce endpoint paths correctly
Diffstat (limited to 'jobs/{{base}}.cpp.mustache')
-rw-r--r-- | jobs/{{base}}.cpp.mustache | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/jobs/{{base}}.cpp.mustache b/jobs/{{base}}.cpp.mustache index 05c865b3..c9b0eb5e 100644 --- a/jobs/{{base}}.cpp.mustache +++ b/jobs/{{base}}.cpp.mustache @@ -19,13 +19,14 @@ class {{#@cap}}{{operationId}}{{/@cap}}Job::Private }; {{/returns?}} +static const auto basePath = QStringLiteral("{{basePathWithoutHost}}"); + {{#operation}} {{#@cap}}{{operationId}}{{/@cap}}Job::{{#@cap}}{{operationId}}{{/@cap}}Job(const ConnectionData* connection{{#allParams}}, {{!}} - {{#avoidCopy?}}const {{dataType}}&{{/avoidCopy?}} - {{^avoidCopy?}}{{dataType}}{{/avoidCopy?}} {{paramName}} + {{#avoidCopy?}}const {{dataType}}&{{/avoidCopy?}}{{^avoidCopy?}}{{dataType}}{{/avoidCopy?}} {{paramName}} {{/allParams}}) : BaseJob(connection, HttpVerb::{{#@cap}}{{#@tolower}}{{httpMethod}}{{/@tolower}}{{/@cap}}, "{{#@cap}}{{operationId}}{{/@cap}}Job" - , {{#pathParts}}{{part}}{{#hasMore}} % {{/hasMore}}{{/pathParts}} + , basePath{{#pathParts}} % {{part}}{{/pathParts}} , Query { {{#queryParams}} { "{{baseName}}", toJson({{paramName}}).toString() }{{#hasMore}}, {{/hasMore}} {{/queryParams}} } |