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 # Structure inside `types`: # - swaggerType: # OR # - swaggerType: # - swaggerFormat: # - /swaggerFormatRegEx/: # - //: # default, if the format doesn't mach anything above # WHERE # targetTypeSpec = targetType OR # { type: targetType, imports: , } # swaggerType can be @apply/@on pair; attributes from the map under @apply # 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: - binary: *ByteStream - +set: { "avoidCopy?": true } +on: - date: type: QDate initializer: QDate::fromString("{{defaultValue}}") imports: - dateTime: type: QDateTime initializer: QDateTime::fromString("{{defaultValue}}") imports: - //: type: QString initializer: QStringLiteral("{{defaultValue}}") string?: true - file: *ByteStream - +set: { "avoidCopy?": true } +on: - object: { type: QJsonObject, imports: } - $ref: - /m\.room\.member$/: pass # This $ref is only used in an array, see below - +set: { "noCopy?": true } +on: - /state_event.yaml$/: { type: StateEventPtr, imports: '"events/event.h"' } - /room_event.yaml$/: { type: RoomEventPtr, imports: '"events/event.h"' } - /event.yaml$/: { type: EventPtr, imports: '"events/event.h"' } - array: - string: { type: QStringList, imports: } - +set: { "noCopy?": true} +on: - /^Notification|Result$/: type: "std::vector<{{1}}>" imports: '"events/event.h"' - /m\.room\.member$/: type: "EventsArray" imports: '"events/roommemberevent.h"' - /state_event.yaml$/: type: StateEvents - /room_event.yaml$/: type: RoomEvents - /event.yaml$/: type: Events - /.+/: { type: "QVector<{{1}}>", imports: } - //: { type: QJsonArray, imports: } # `additionalProperties` in OpenAPI - map: - RoomState: type: "std::unordered_map" noCopy?: true imports: - /.+/: type: "QHash" imports: - //: type: QVariantHash imports: '"variant_converters.h"' # A sequence `type` in OpenAPI - variant: { type: QVariant, imports: '"variant_converters.h"' } - schema: # Properties of inline structure definitions *UseOmittable #operations: mustache: definitions: _scopeRenderer: "{{scopeCamelCase}}Job::" _literalQuote: '"' omittedValue: '{}' # default value to initialize omitted parameters with openOmittable: "{{^required?}}{{#useOmittable}}Omittable<{{/useOmittable}}{{/required?}}" closeOmittable: "{{^required?}}{{#useOmittable}}>{{/useOmittable}}{{/required?}}" maybeOmittableType: "{{>openOmittable}}{{dataType.name}}{{>closeOmittable}}" qualifiedMaybeOmittableType: "{{>openOmittable}}{{dataType.qualifiedName}}{{>closeOmittable}}" maybeCrefType: "{{#avoidCopy?}}const {{/avoidCopy?}}{{>maybeOmittableType}}{{#avoidCopy?}}&{{/avoidCopy?}}{{#noCopy?}}&&{{/noCopy?}}" qualifiedMaybeCrefType: "{{#avoidCopy?}}const {{/avoidCopy?}}{{>qualifiedMaybeOmittableType}}{{#avoidCopy?}}&{{/avoidCopy?}}{{#noCopy?}}&&{{/noCopy?}}" initializeDefaultValue: "{{#defaultValue}}{{#initializer}}{{>initializer}}{{/initializer}}{{/defaultValue}}{{^defaultValue}}{{>omittedValue}}{{/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: templates: - "{{base}}.h.mustache" - "{{base}}.cpp.mustache" #outFilesList: apifiles.txt