aboutsummaryrefslogtreecommitdiff
path: root/lib/csapi/gtad.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'lib/csapi/gtad.yaml')
-rw-r--r--lib/csapi/gtad.yaml145
1 files changed, 0 insertions, 145 deletions
diff --git a/lib/csapi/gtad.yaml b/lib/csapi/gtad.yaml
deleted file mode 100644
index cb5e553c..00000000
--- a/lib/csapi/gtad.yaml
+++ /dev/null
@@ -1,145 +0,0 @@
-analyzer:
- subst:
- "%CLIENT_RELEASE_LABEL%": r0
- "%CLIENT_MAJOR_VERSION%": r0
- identifiers:
- signed: signedData
- unsigned: unsignedData
- default: isDefault
- origin_server_ts: originServerTimestamp # Instead of originServerTs
- start: begin # Because start() is a method in BaseJob
- m.upload.size: uploadSize
- m.homeserver: homeserver
- m.identity_server: identityServer
- AuthenticationData/additionalProperties: authInfo
-
- # Structure inside `types`:
- # - 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...> }
- # swaggerType can be +set/+on pair; attributes from the map under +set
- # are added to each type from the sequence under +on.
- types:
- - +set: &UseOmittable
- useOmittable:
- imports: [ '"converters.h"' ]
- omittedValue: 'none' # See `none` in converters.h
- +on:
- - integer:
- - int64: qint64
- - int32: qint32
- - //: int
- - number:
- - float: float
- - //: double
- - boolean: { type: bool, omittedValue: 'false' }
- - string:
- - byte: &ByteStream
- type: QIODevice*
- imports: <QtCore/QIODevice>
- - binary: *ByteStream
- - +set: { avoidCopy: }
- +on:
- - date:
- type: QDate
- initializer: QDate::fromString("{{defaultValue}}")
- imports: <QtCore/QDate>
- - dateTime:
- type: QDateTime
- initializer: QDateTime::fromString("{{defaultValue}}")
- imports: <QtCore/QDateTime>
- - //: &QString
- type: QString
- initializer: QStringLiteral("{{defaultValue}}")
- isString:
- - file: *ByteStream
- - +set: { avoidCopy: }
- +on:
- - object: &QJsonObject { type: QJsonObject, imports: <QtCore/QJsonObject> }
- - $ref:
- - +set: { moveOnly: }
- +on:
- - /state_event.yaml$/:
- { type: StateEventPtr, imports: '"events/eventloader.h"' }
- - /room_event.yaml$/:
- { type: RoomEventPtr, imports: '"events/eventloader.h"' }
- - /event.yaml$/:
- { type: EventPtr, imports: '"events/eventloader.h"' }
- - /m\.room\.member$/: pass # This $ref is only used in an array, see below
- - //: *UseOmittable # Also apply "avoidCopy" to all other ref'ed types
- - schema: # Properties of inline structure definitions
- - TurnServerCredentials: *QJsonObject # Because it's used as is
- - //: *UseOmittable
- - array:
- - string: QStringList
- - +set: { moveOnly: }
- +on:
- - /^Notification|Result$/:
- type: "std::vector<{{1}}>"
- imports: '"events/eventloader.h"'
- - /m\.room\.member$/:
- type: "EventsArray<RoomMemberEvent>"
- imports: '"events/roommemberevent.h"'
- - /state_event.yaml$/:
- type: StateEvents
- - /room_event.yaml$/:
- type: RoomEvents
- - /event.yaml$/:
- type: Events
- - //: { type: "QVector<{{1}}>", imports: <QtCore/QVector> }
- - map: # `additionalProperties` in OpenAPI
- - RoomState:
- type: "std::unordered_map<QString, {{1}}>"
- moveOnly:
- imports: <unordered_map>
- - /.+/:
- type: "QHash<QString, {{1}}>"
- imports: <QtCore/QHash>
- - //:
- type: QVariantHash
- imports: <QtCore/QVariant>
- - variant: # A sequence `type` (multitype) in OpenAPI
- - /^string,null|null,string$/: *QString
- - //: { type: QVariant, imports: <QtCore/QVariant> }
-
- #operations:
-
-mustache:
- 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: '{{#hasMore}}, {{/hasMore}}'
- openOmittable: "{{^required?}}{{#useOmittable}}{{^defaultValue}}Omittable<{{/defaultValue}}{{/useOmittable}}{{/required?}}"
- closeOmittable: "{{^required?}}{{#useOmittable}}{{^defaultValue}}>{{/defaultValue}}{{/useOmittable}}{{/required?}}"
- maybeOmittableType: "{{>openOmittable}}{{dataType.name}}{{>closeOmittable}}"
- qualifiedMaybeOmittableType: "{{>openOmittable}}{{dataType.qualifiedName}}{{>closeOmittable}}"
- maybeCrefType: "{{#avoidCopy}}const {{/avoidCopy}}{{>maybeOmittableType}}{{#avoidCopy}}&{{/avoidCopy}}{{#moveOnly}}&&{{/moveOnly}}"
- qualifiedMaybeCrefType:
- "{{#avoidCopy}}const {{/avoidCopy}}{{>qualifiedMaybeOmittableType}}{{#avoidCopy}}&{{/avoidCopy}}{{#moveOnly}}&&{{/moveOnly}}"
- initializeDefaultValue: "{{#defaultValue}}{{>initializer}}{{/defaultValue}}{{^defaultValue}}{{>omittedValue}}{{/defaultValue}}"
- joinedParamDecl: '{{>maybeCrefType}} {{paramName}}{{^required?}} = {{>initializeDefaultValue}}{{/required?}}{{>cjoin}}'
- joinedParamDef: '{{>maybeCrefType}} {{paramName}}{{>cjoin}}'
- passQueryParams: '{{#queryParams}}{{paramName}}{{>cjoin}}{{/queryParams}}'
- copyrightName: Kitsune Ral
- copyrightEmail: <kitsune-ral@users.sf.net>
-
- templates:
- - "{{base}}.h.mustache"
- - "{{base}}.cpp.mustache"
-
- #outFilesList: apifiles.txt
-