aboutsummaryrefslogtreecommitdiff
path: root/lib/jobs/gtad.yaml
blob: 052d830115d4ac28eb4936055da7c11452814d3d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
analyzer:
  subst:
    "%CLIENT_RELEASE_LABEL%": r0
    "%CLIENT_MAJOR_VERSION%": r0
  identifiers:
    signed: signedData
    unsigned: unsignedData
    default: isDefault
    origin_server_ts: originServerTimestamp

  types:
    # Structure:
    # swaggerType: <targetTypeSpec>
    # OR
    # swaggerType:
    #   - swaggerFormat: <targetTypeSpec>
    #   - /swaggerFormatRegEx/: <targetTypeSpec>
    #   - //: <targetTypeSpec> # default, if the format doesn't mach anything above
    # WHERE
    # targetTypeSpec = targetType OR
    #   { type: targetType, imports: <filename OR [ filenames... ]>, <other attributes...> }
    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: <QtCore/QIODevice>
    - binary: *ByteStream
    - date:
        type: QDate
        initializer: QDate::fromString("{{defaultValue}}")
        avoidCopy?: true
        imports: <QtCore/QDate>
    - dateTime:
        type: QDateTime
        initializer: QDateTime::fromString("{{defaultValue}}")
        avoidCopy?: true
        imports: <QtCore/QDateTime>
    - //:
        type: QString
        initializer: QStringLiteral("{{defaultValue}}")
        string?: true
        avoidCopy?: true
    file: *ByteStream
    object:
    - definitions/event.yaml:
        type: EventPtr
        imports: '"events/event.h"'
    - //:
        type: QJsonObject
        avoidCopy?: true
        imports: <QtCore/QJsonObject>
    array:
    - Notification:
        type: "std::vector<{{1}}>"
        avoidCopy?: true
        imports: <vector>
    - /.+/:
        type: "QVector<{{1}}>"
        avoidCopy?: true
        imports: <QtCore/QVector>
    - //: { type: QJsonArray, "avoidCopy?": true, imports: <QtCore/QJsonArray> }
    variant: { type: QVariant, "avoidCopy?": true, imports: <QtCore/QVariant> }
    schema:
      avoidCopy?: true

  #operations:

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: <kitsune-ral@users.sf.net>
  #  imports: { set: }

  templates:
  - "{{base}}.h.mustache"
  - "{{base}}.cpp.mustache"

  #outFilesList: apifiles.txt