diff options
author | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2022-06-11 16:51:28 +0200 |
---|---|---|
committer | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2022-06-11 17:01:28 +0200 |
commit | 40311ec08a88de821884197bc60f1b48748cbbb3 (patch) | |
tree | 0d8efee93c79cf66f2056b740bdc9900e952e04f | |
parent | d547e84c9335d9524ae7530be622d5ed2f0b1fb8 (diff) | |
download | libquotient-40311ec08a88de821884197bc60f1b48748cbbb3.tar.gz libquotient-40311ec08a88de821884197bc60f1b48748cbbb3.zip |
gtad.yaml: more clarifying comments
-rw-r--r-- | gtad/gtad.yaml | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/gtad/gtad.yaml b/gtad/gtad.yaml index 2d004cbc..12a27c06 100644 --- a/gtad/gtad.yaml +++ b/gtad/gtad.yaml @@ -88,7 +88,8 @@ analyzer: - /(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$/': @@ -96,7 +97,20 @@ 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: @@ -117,17 +131,17 @@ analyzer: - /^Notification|Result$/: type: "std::vector<{{1}}>" imports: '"events/eventloader.h"' - - /state_event.yaml$/: StateEvents - - /(room|client)_event.yaml$/: RoomEvents - - /event(_without_room_id)?.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 |