From dbb70c537f017e94bd7e97c05357e89f38f6e69c Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Mon, 30 Apr 2018 22:18:17 +0900 Subject: gtad.yaml: Migrate to GTAD 0.5 config format --- lib/jobs/gtad.yaml | 160 +++++++++++++++++++++++++++-------------------------- 1 file changed, 81 insertions(+), 79 deletions(-) (limited to 'lib/jobs/gtad.yaml') diff --git a/lib/jobs/gtad.yaml b/lib/jobs/gtad.yaml index 78c879e4..7cfbab8f 100644 --- a/lib/jobs/gtad.yaml +++ b/lib/jobs/gtad.yaml @@ -1,87 +1,89 @@ -preprocess: - "%CLIENT_RELEASE_LABEL%": r0 - "%CLIENT_MAJOR_VERSION%": r0 - # FIXME: the below only fixes C++ compilation but not actual work - the code - # will try to reach out for wrong values in JSON payloads - #"signed:": "signedData:" - #"unsigned:": "unsignedData:" - #"default:": "isDefault:" +analyzer: + subst: + "%CLIENT_RELEASE_LABEL%": r0 + "%CLIENT_MAJOR_VERSION%": r0 + identifiers: + signed: signedData + unsigned: unsignedData + default: isDefault + origin_server_ts: originServerTimestamp -# Structure: -# swaggerType: -# OR -# swaggerType: -# - swaggerFormat: -# - /swaggerFormatRegEx/: -# - //: # default, if the format doesn't mach anything above -# WHERE -# targetTypeSpec = targetType OR -# { type: targetType, imports: , } -types: - integer: - - int64: qint64 - - int32: qint32 - - //: int - number: - - float: float - - //: double - boolean: { type: bool, initializer: false } - string: - - byte: &ByteStream - type: QIODevice* - #initializer: '"{{defaultValue}}"' - #string?: true - imports: - - binary: *ByteStream - - date: - type: QDate - initializer: QDate::fromString("{{defaultValue}}") + types: + # Structure: + # swaggerType: + # OR + # swaggerType: + # - swaggerFormat: + # - /swaggerFormatRegEx/: + # - //: # default, if the format doesn't mach anything above + # WHERE + # targetTypeSpec = targetType OR + # { type: targetType, imports: , } + integer: + - int64: qint64 + - int32: qint32 + - //: int + number: + - float: float + - //: double + boolean: { type: bool, initializer: false } + string: + - byte: &ByteStream + type: QIODevice* + #initializer: '"{{defaultValue}}"' + #string?: true + imports: + - binary: *ByteStream + - date: + type: QDate + initializer: QDate::fromString("{{defaultValue}}") + avoidCopy?: true + imports: + - dateTime: + type: QDateTime + initializer: QDateTime::fromString("{{defaultValue}}") + avoidCopy?: true + imports: + - //: + type: QString + initializer: QStringLiteral("{{defaultValue}}") + string?: true + avoidCopy?: true + file: *ByteStream + object: + type: QJsonObject avoidCopy?: true - imports: - - dateTime: - type: QDateTime - initializer: QDateTime::fromString("{{defaultValue}}") + imports: + array: + - /.+/: + type: "QVector<{{1}}>" + avoidCopy?: true + imports: + - //: { type: QJsonArray, "avoidCopy?": true, imports: } + schema: avoidCopy?: true - imports: - - //: - type: QString - initializer: QStringLiteral("{{defaultValue}}") - string?: true - avoidCopy?: true - file: *ByteStream - object: - type: QJsonObject - avoidCopy?: true - imports: - array: - - /.+/: - type: "QVector<{{1}}>" - avoidCopy?: true - imports: - - //: { type: QJsonArray, "avoidCopy?": true, imports: } - schema: - avoidCopy?: true -#operations: + #operations: -env: - _scopeRenderer: "{{scopeCamelCase}}Job::" - _literalQuote: '"' - maybeCrefType: "{{#avoidCopy?}}const {{/avoidCopy?}}{{dataType.name}}{{#avoidCopy?}}&{{/avoidCopy?}}" - qualifiedMaybeCrefType: "{{#avoidCopy?}}const {{/avoidCopy?}}{{dataType.qualifiedName}}{{#avoidCopy?}}&{{/avoidCopy?}}" - initializeDefaultValue: "{{#defaultValue}}{{>initializer}}{{/defaultValue}}{{^defaultValue}}{}{{/defaultValue}}" - joinedParamDecl: '{{>maybeCrefType}} {{paramName}}{{^required?}} = {{>initializeDefaultValue}}{{/required?}}{{#@join}}, {{/@join}}' - joinedParamDef: '{{>maybeCrefType}} {{paramName}}{{#@join}}, {{/@join}}' - passQueryParams: '{{#queryParams}}{{paramName}}{{#@join}}, {{/@join}}{{/queryParams}}' - paramToString: '{{#string?}}{{nameCamelCase}}{{/string?}}{{^string?}}QString("%1").arg({{nameCamelCase}}){{/string?}}' -# preamble: preamble.mustache - copyrightName: Kitsune Ral - copyrightEmail: -# imports: { set: } +mustache: + definitions: + _scopeRenderer: "{{scopeCamelCase}}Job::" + _literalQuote: '"' + maybeCrefType: "{{#avoidCopy?}}const {{/avoidCopy?}}{{dataType.name}}{{#avoidCopy?}}&{{/avoidCopy?}}" + qualifiedMaybeCrefType: "{{#avoidCopy?}}const {{/avoidCopy?}}{{dataType.qualifiedName}}{{#avoidCopy?}}&{{/avoidCopy?}}" + initializeDefaultValue: "{{#defaultValue}}{{>initializer}}{{/defaultValue}}{{^defaultValue}}{}{{/defaultValue}}" + joinedParamDecl: '{{>maybeCrefType}} {{paramName}}{{^required?}} = {{>initializeDefaultValue}}{{/required?}}{{#@join}}, {{/@join}}' + joinedParamDef: '{{>maybeCrefType}} {{paramName}}{{#@join}}, {{/@join}}' + passQueryParams: '{{#queryParams}}{{paramName}}{{#@join}}, {{/@join}}{{/queryParams}}' + paramToString: '{{#string?}}{{nameCamelCase}}{{/string?}}{{^string?}}QString("%1").arg({{nameCamelCase}}){{/string?}}' + # preamble: preamble.mustache + copyrightName: Kitsune Ral + copyrightEmail: + # imports: { set: } -templates: -- "{{base}}.h.mustache" -- "{{base}}.cpp.mustache" + templates: + - "{{base}}.h.mustache" + - "{{base}}.cpp.mustache" -#outFilesList: apifiles.txt + #outFilesList: apifiles.txt -- cgit v1.2.3