diff options
author | arawaaa <77910862+arawaaa@users.noreply.github.com> | 2021-12-27 17:35:28 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-27 17:35:28 -0600 |
commit | 7ec3ba834dd313c4408622da30e04cdc6f4cf7c7 (patch) | |
tree | 679d7dc5939a229ad46676cd1d7aeaea7a25abce /gtad/gtad.yaml | |
parent | 17bf4d180297c7e87363e179b8afa79ddb15dca7 (diff) | |
parent | 674e984e459375974f619d0e778d43a2cc928dc3 (diff) | |
download | libquotient-7ec3ba834dd313c4408622da30e04cdc6f4cf7c7.tar.gz libquotient-7ec3ba834dd313c4408622da30e04cdc6f4cf7c7.zip |
Merge branch 'dev' into pinned
Diffstat (limited to 'gtad/gtad.yaml')
-rw-r--r-- | gtad/gtad.yaml | 52 |
1 files changed, 29 insertions, 23 deletions
diff --git a/gtad/gtad.yaml b/gtad/gtad.yaml index adf5024a..943ac013 100644 --- a/gtad/gtad.yaml +++ b/gtad/gtad.yaml @@ -68,6 +68,9 @@ analyzer: - dateTime: type: QDateTime initializer: QDateTime::fromString("{{defaultValue}}") + - uri: + type: QUrl + initializer: QUrl::fromEncoded("{{defaultValue}}") - //: &QString type: QString initializer: QStringLiteral("{{defaultValue}}") @@ -77,28 +80,31 @@ analyzer: +on: - object: &QJsonObject { type: QJsonObject } - $ref: - - +set: { moveOnly: } + - +set: + moveOnly: + imports: '"events/eventloader.h"' + +on: + - /state_event.yaml$/: StateEventPtr + - /room_event.yaml$/: RoomEventPtr + - /event.yaml$/: EventPtr + - /m\.room\.member/: void # Skip resolving; see EventsArray<> below + - +set: + # This renderer actually applies to all $ref things + _importRenderer: '"{{#segments}}{{_}}{{#_join}}/{{/_join}}{{/segments}}.h"' +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$/: void # Skip resolving; see EventsArray<> below - - '/^(\./)?definitions/request_email_validation.yaml$/': - title: EmailValidationData - - '/^(\./)?definitions/request_msisdn_validation.yaml$/': - title: MsisdnValidationData - - /_filter.yaml$/: # Event/RoomEventFilters do NOT need Omittable<> - - /public_rooms_response.yaml$/: { _inline: true } - - //: *UseOmittable # Also apply "avoidCopy" to all other ref'ed types + - '/^(\./)?definitions/request_email_validation.yaml$/': + title: EmailValidationData + - '/^(\./)?definitions/request_msisdn_validation.yaml$/': + title: MsisdnValidationData + - /_filter.yaml$/: # Event/RoomEventFilters do NOT need Omittable<> + - /public_rooms_response.yaml$/: { _inline: true } + - //: *UseOmittable # Also apply "avoidCopy" to all other ref'ed types - schema: - getTurnServer<: *QJsonObject # It's used as an opaque JSON object - PublicRoomResponse: { _inline: true } # - defineFilter>: &Filter # Force folding into a structure # type: Filter -# imports: "csapi/definitions/sync_filter.h" +# imports: '"csapi/definitions/sync_filter.h"' # - getFilter<: *Filter - RoomFilter: # A structure inside Filter, same story as with *_filter.yaml - //: *UseOmittable @@ -108,10 +114,10 @@ analyzer: +on: - /^Notification|Result$/: type: "std::vector<{{1}}>" - imports: "events/eventloader.h" - - /m\.room\.member$/: # Only used in an array (see also above) + imports: '"events/eventloader.h"' + - /m\.room\.member/: # Only used in an array (see also above) type: "EventsArray<RoomMemberEvent>" - imports: "events/roommemberevent.h" + imports: '"events/roommemberevent.h"' - /state_event.yaml$/: StateEvents - /room_event.yaml$/: RoomEvents - /event.yaml$/: Events @@ -129,12 +135,12 @@ analyzer: #operations: mustache: +# delimiter: '%| |%' # or something else instead of '{{ }}' constants: # Syntax elements used by GTAD # _quote: '"' # Common quote for left and right # _leftQuote: '"' -# _rightQuote: '"' -# _joinChar: ',' # The character used by {{_join}} - not working yet +# _rightQuote: '"_ls' _comment: '//' copyrightName: Kitsune Ral copyrightEmail: <kitsune-ral@users.sf.net> @@ -184,8 +190,8 @@ mustache: joinedParamDef: "{{>maybeCrefType}} {{paramName}}{{>cjoin}}" passPathAndMaybeQuery: >- - QStringLiteral("{{basePathWithoutHost}}") - {{#pathParts}} % {{_}}{{/pathParts}}{{#queryParams?}}, + makePath("{{basePathWithoutHost}}"{{#pathParts}}, + {{_}}{{/pathParts}}){{#queryParams?}}, queryTo{{camelCaseOperationId}}( {{#queryParams}}{{paramName}}{{>cjoin}}{{/queryParams}}){{/queryParams?}} |