diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/csapi/gtad.yaml | 14 | ||||
-rw-r--r-- | lib/csapi/{{base}}.cpp.mustache | 4 | ||||
-rw-r--r-- | lib/csapi/{{base}}.h.mustache | 2 |
3 files changed, 13 insertions, 7 deletions
diff --git a/lib/csapi/gtad.yaml b/lib/csapi/gtad.yaml index a6db9716..31dd6a83 100644 --- a/lib/csapi/gtad.yaml +++ b/lib/csapi/gtad.yaml @@ -109,12 +109,18 @@ analyzer: #operations: mustache: - definitions: - _scopeRenderer: "{{scopeCamelCase}}Job::" - _literalQuote: '"' + constants: + # Syntax elements used by GTAD +# _quote: '"' # Common quote for left and right +# _leftQuote: '"' +# _rightQuote: '"' +# _joinChar: ',' # The character used by {{_join}} - not working yet + _comment: '//' + partials: + _typeRenderer: "{{#scope}}{{scopeCamelCase}}Job::{{/scope}}{{>name}}" omittedValue: '{}' # default value to initialize omitted parameters with initializer: '{{defaultValue}}' - cjoin: '{{#@join}}, {{/@join}}' + cjoin: '{{#hasMore}}, {{/hasMore}}' openOmittable: "{{^required?}}{{#useOmittable}}{{^defaultValue}}Omittable<{{/defaultValue}}{{/useOmittable}}{{/required?}}" closeOmittable: "{{^required?}}{{#useOmittable}}{{^defaultValue}}>{{/defaultValue}}{{/useOmittable}}{{/required?}}" maybeOmittableType: "{{>openOmittable}}{{dataType.name}}{{>closeOmittable}}" diff --git a/lib/csapi/{{base}}.cpp.mustache b/lib/csapi/{{base}}.cpp.mustache index 78265951..eced328c 100644 --- a/lib/csapi/{{base}}.cpp.mustache +++ b/lib/csapi/{{base}}.cpp.mustache @@ -1,4 +1,4 @@ -{{#@filePartial}}preamble{{/@filePartial}} +{{>preamble}} #include "{{filenameBase}}.h" {{^models}} #include "converters.h" @@ -76,7 +76,7 @@ QUrl {{camelCaseOperationId}}Job::makeRequestUrl(QUrl baseUrl{{#allParams?}}, {{ static const auto {{camelCaseOperationId}}JobName = QStringLiteral("{{camelCaseOperationId}}Job"); {{camelCaseOperationId}}Job::{{camelCaseOperationId}}Job({{#allParams}}{{>joinedParamDef}}{{/allParams}}) - : BaseJob(HttpVerb::{{#@cap}}{{#@tolower}}{{httpMethod}}{{/@tolower}}{{/@cap}}, {{camelCaseOperationId}}JobName, + : BaseJob(HttpVerb::{{#_cap}}{{#_tolower}}{{httpMethod}}{{/_tolower}}{{/_cap}}, {{camelCaseOperationId}}JobName, basePath{{#pathParts}} % {{_}}{{/pathParts}}{{#queryParams?}}, queryTo{{camelCaseOperationId}}({{>passQueryParams}}){{/queryParams?}}{{#skipAuth}}{{#queryParams?}}, {}{{/queryParams?}}, false{{/skipAuth}}){{#responses}}{{#normalResponse?}}{{#allProperties?}} diff --git a/lib/csapi/{{base}}.h.mustache b/lib/csapi/{{base}}.h.mustache index 0b7de817..d6b374fb 100644 --- a/lib/csapi/{{base}}.h.mustache +++ b/lib/csapi/{{base}}.h.mustache @@ -1,4 +1,4 @@ -{{#@filePartial}}preamble{{/@filePartial}} +{{>preamble}} #pragma once {{#operations}}#include "jobs/basejob.h" |