aboutsummaryrefslogtreecommitdiff
path: root/gtad/gtad.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'gtad/gtad.yaml')
-rw-r--r--gtad/gtad.yaml52
1 files changed, 33 insertions, 19 deletions
diff --git a/gtad/gtad.yaml b/gtad/gtad.yaml
index 03c23886..0bec3b7a 100644
--- a/gtad/gtad.yaml
+++ b/gtad/gtad.yaml
@@ -29,6 +29,8 @@ analyzer:
login>/user: ""
login>/medium: ""
login>/address: ""
+ login</home_server: ""
+ register</home_server: ""
# Structure inside `types`:
# - swaggerType: <targetTypeSpec>
@@ -85,11 +87,11 @@ 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
+ # This renderer applies to everything actually $ref'ed
+ # (not substituted)
_importRenderer: '"{{#segments}}{{_}}{{#_join}}/{{/_join}}{{/segments}}.h"'
+on:
- '/^(\./)?definitions/request_email_validation.yaml$/':
@@ -97,38 +99,53 @@ analyzer:
- '/^(\./)?definitions/request_msisdn_validation.yaml$/':
title: MsisdnValidationData
- /_filter.yaml$/: # Event/RoomEventFilters do NOT need Omittable<>
+
+ # Despite being used in two calls, it's more practical to have those
+ # fields available as getters right from the respective job classes
- /public_rooms_response.yaml$/: { _inline: true }
+
+ # list_public_rooms.yaml (via public_rooms_response.yaml) and
+ # space_hierarchy.yaml use public_rooms_chunk.yaml as a common base
+ # structure, adding (space_hiearchy) or overriding
+ # (public_rooms_response) fields for their purposes. The spec text
+ # confusingly ends up with having two different structures named
+ # "PublicRoomsChunk". To make sure the types are distinct in
+ # libQuotient, this common base is inlined into the actually used
+ # data structures (that have distinct names) defined
+ # in space_hierarchy.h and public_rooms_response.h, respectively
+ - /public_rooms_chunk.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"'
# - getFilter<: *Filter
+ - StrippedChildStateEvent: void # only used in an array, see below
- RoomFilter: # A structure inside Filter, same story as with *_filter.yaml
+ - OneTimeKeys:
+ type: OneTimeKeys
+ imports: '"e2ee/e2ee.h"'
- //: *UseOmittable
- array:
- string: QStringList
- +set: { moveOnly: }
+on:
- - /^Notification|Result$/:
- type: "std::vector<{{1}}>"
+ - /^Notification|Result|ChildRoomsChunk$/: "std::vector<{{1}}>"
+ - StrippedChildStateEvent:
+ type: StateEvents
imports: '"events/eventloader.h"'
- - /m\.room\.member/: # Only used in an array (see also above)
- type: "EventsArray<RoomMemberEvent>"
- imports: '"events/roommemberevent.h"'
- - /state_event.yaml$/: StateEvents
- - /room_event.yaml$/: RoomEvents
- - /event.yaml$/: Events
+ - /state_event.yaml$/: StateEvents # 'imports' already set under $ref
+ - /(room|client)_event.yaml$/: RoomEvents # ditto
+ - /event(_without_room_id)?.yaml$/: Events # ditto
- //: "QVector<{{1}}>"
- map: # `additionalProperties` in OpenAPI
- RoomState:
type: "UnorderedMap<QString, {{1}}>"
moveOnly:
- /.+/: "QHash<QString, {{1}}>"
- - //: QVariantHash
- - variant: # A sequence `type` (multitype) in OpenAPI
+ - //: QVariantHash # QJsonObject?..
+ - variant: # A sequence `type` or a 'oneOf' group in OpenAPI
- /^string,null|null,string$/: *QString
- //: QVariant
@@ -164,11 +181,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}}\