From fff5f87c3d937697d7208d65618abf8669fff621 Mon Sep 17 00:00:00 2001 From: Patrick Cloke Date: Wed, 19 Jan 2022 15:30:09 -0500 Subject: [PATCH] Fix the type of children in the /hierarchy S-S API. (#3660) * Fix the type of children in the /hierarchy S-S API. * Newsfragment --- .../server_server/newsfragments/3660.new | 1 + data/api/server-server/space_hierarchy.yaml | 32 ++++++++++--------- 2 files changed, 18 insertions(+), 15 deletions(-) create mode 100644 changelogs/server_server/newsfragments/3660.new diff --git a/changelogs/server_server/newsfragments/3660.new b/changelogs/server_server/newsfragments/3660.new new file mode 100644 index 00000000..a53b49cc --- /dev/null +++ b/changelogs/server_server/newsfragments/3660.new @@ -0,0 +1 @@ +Add the Space Hierarchy API (`GET /_matrix/federation/v1/hierarchy/{roomId}`) as per [MSC2946](https://github.com/matrix-org/matrix-doc/pull/2946). \ No newline at end of file diff --git a/data/api/server-server/space_hierarchy.yaml b/data/api/server-server/space_hierarchy.yaml index 0fba3cd5..cb30fa0f 100644 --- a/data/api/server-server/space_hierarchy.yaml +++ b/data/api/server-server/space_hierarchy.yaml @@ -160,25 +160,27 @@ paths: required: [origin_server_ts] required: [room_type, allowed_room_ids, children_state] children: + type: array description: |- A summary of the space's children. Rooms which the requesting server cannot peek/join will be excluded. - allOf: - - $ref: "../client-server/definitions/public_rooms_chunk.yaml" - - type: object - properties: - room_type: - type: string - description: |- - The `type` of room (from [`m.room.create`](/client-server-api/#mroomcreate)), if any. - allowed_room_ids: - type: array - items: + items: + allOf: + - $ref: "../client-server/definitions/public_rooms_chunk.yaml" + - type: object + properties: + room_type: type: string - description: |- - If the room is a [restricted room](#restricted-rooms), these are the room IDs which - are specified by the join rules. Empty or omitted otherwise. - required: [room_type, allowed_room_ids, children_state] + description: |- + The `type` of room (from [`m.room.create`](/client-server-api/#mroomcreate)), if any. + allowed_room_ids: + type: array + items: + type: string + description: |- + If the room is a [restricted room](#restricted-rooms), these are the room IDs which + are specified by the join rules. Empty or omitted otherwise. + required: [room_type, allowed_room_ids, children_state] inaccessible_children: type: array items: