From 3c6ca3c89d7b1a972d50ec4eb0b42ab350771f72 Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Tue, 31 May 2022 17:36:17 +0200 Subject: Update gtad.yml to match v3 API definitions Also: use quotient-im/matrix-spec main branch again, now that it has adjusted definitions; drop un(der)used partials --- gtad/gtad.yaml | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) (limited to 'gtad/gtad.yaml') diff --git a/gtad/gtad.yaml b/gtad/gtad.yaml index 03c23886..e8d4ba35 100644 --- a/gtad/gtad.yaml +++ b/gtad/gtad.yaml @@ -85,9 +85,8 @@ analyzer: 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 + - /(room|client)_event.yaml$/: RoomEventPtr + - /event(_without_room_id)?.yaml$/: EventPtr - +set: # This renderer actually applies to all $ref things _importRenderer: '"{{#segments}}{{_}}{{#_join}}/{{/_join}}{{/segments}}.h"' @@ -115,12 +114,9 @@ analyzer: - /^Notification|Result$/: type: "std::vector<{{1}}>" imports: '"events/eventloader.h"' - - /m\.room\.member/: # Only used in an array (see also above) - type: "EventsArray" - imports: '"events/roommemberevent.h"' - /state_event.yaml$/: StateEvents - - /room_event.yaml$/: RoomEvents - - /event.yaml$/: Events + - /(room|client)_event.yaml$/: RoomEvents + - /event(_without_room_id)?.yaml$/: Events - //: "QVector<{{1}}>" - map: # `additionalProperties` in OpenAPI - RoomState: @@ -164,11 +160,8 @@ mustache: qualifiedMaybeOmittableType: "{{>openOmittable}}{{dataType.qualifiedName}}{{>closeOmittable}}" - ref: "{{#avoidCopy}}&{{/avoidCopy}}{{#moveOnly}}&&{{/moveOnly}}" maybeCrefType: - "{{#avoidCopy}}const {{/avoidCopy}}{{>maybeOmittableType}}{{>ref}}" - qualifiedMaybeCrefType: - "{{#avoidCopy}}const {{/avoidCopy}}{{>qualifiedMaybeOmittableType}}{{>ref}}" + "{{#avoidCopy}}const {{/avoidCopy}}{{>maybeOmittableType}}{{#avoidCopy}}&{{/avoidCopy}}" maybeCrefJsonObject: "{{^propertyMap}}const QJsonObject&{{/propertyMap}}\ -- cgit v1.2.3 From fed831820965ad5654317d5e7df18c23fa75de20 Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Tue, 31 May 2022 16:30:22 +0200 Subject: gtad.yaml (again): shortcut OneTimeKeys This requires OneTimeKeys in keys.yaml to be marked as such (done in quotient-im/matrix-spec but it's not there in matrix-org/matrix-spec). --- gtad/gtad.yaml | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gtad/gtad.yaml') diff --git a/gtad/gtad.yaml b/gtad/gtad.yaml index e8d4ba35..b1c143b6 100644 --- a/gtad/gtad.yaml +++ b/gtad/gtad.yaml @@ -106,6 +106,9 @@ analyzer: # imports: '"csapi/definitions/sync_filter.h"' # - getFilter<: *Filter - RoomFilter: # A structure inside Filter, same story as with *_filter.yaml + - OneTimeKeys: + type: OneTimeKeys + imports: '"e2ee/e2ee.h"' - //: *UseOmittable - array: - string: QStringList -- cgit v1.2.3