blob: 5f370ac524323c26696e937a67a0641440d2e289 (
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
|
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:"
# 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...> }
types:
integer:
- int64: qint64
- int32: qint32
- //: int
number:
- float: float
- //: double
boolean: bool
string:
- byte: &QByteArray
type: QByteArray
string?: true
imports: <QtCore/QByteArray>
- binary: *QByteArray
- date: { type: QDate, "avoidCopy?": true, imports: <QtCore/QDate> }
- dateTime:
type: QDateTime
avoidCopy?: true
imports: <QtCore/QDateTime>
- //:
type: QString
string?: true
avoidCopy?: true
imports: <QtCore/QString>
file:
type: QByteArray
imports: <QtCore/QByteArray>
returnFile?: true
object:
type: QJsonObject
avoidCopy?: true
imports: <QtCore/QJsonObject>
array:
- /.+/:
type: "QVector<{{1}}>"
avoidCopy?: true
imports: <QtCore/QVector>
- //: { type: QJsonArray, "avoidCopy?": true, imports: <QtCore/QJsonArray> }
#operations:
env:
_typeRenderer: "{{#scope}}{{scopeCamelCase}}Job::{{/scope}}{{name}}"
maybeCrefType: "{{#avoidCopy?}}const {{/avoidCopy?}}{{dataType.name}}{{#avoidCopy?}}&{{/avoidCopy?}}"
qualifiedMaybeCrefType: "{{#avoidCopy?}}const {{/avoidCopy?}}{{dataType.qualifiedName}}{{#avoidCopy?}}&{{/avoidCopy?}}"
# preamble: preamble.mustache
copyrightName: Kitsune Ral
copyrightEmail: <kitsune-ral@users.sf.net>
# imports: { set: }
# returnFile?: { bool: false }
templates:
- "{{base}}.h.mustache"
- "{{base}}.cpp.mustache"
#outFilesList: apifiles.txt
|