From 6adacd18c107cb01c9486a2e592b4ea16fa28c7d Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Wed, 15 Jun 2022 06:04:10 +0200 Subject: [PATCH] Arrange a few titles (#1126) * Arrange a few titles Before this change, PublicRoomsChunk in the spec text could be found in two places (actually three but the third one is identical to the first one), defining two (_mostly_ identical but) different schemas. Ctrl-F'ing through the spec may confuse you with the "wrong" definition. This commit gives distinct schemas distinct names; aside from PublicRoomChunk, the same story happens with the derivative of stripped_state.yaml used in space_hierarchy.yaml (it's not exactly StrippedStateEvent either). As for the removal of `PublicRoomsChunks` (plural) - this title is unnecessary because the tooling would place rather self-explanatory `[PublicRoomsChunk]` without it, whereas the plural title ends up with no definition in the spec text. * Add changelog --- changelogs/client_server/newsfragments/1126.clarification | 1 + data/api/client-server/definitions/public_rooms_response.yaml | 2 +- data/api/client-server/space_hierarchy.yaml | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 changelogs/client_server/newsfragments/1126.clarification diff --git a/changelogs/client_server/newsfragments/1126.clarification b/changelogs/client_server/newsfragments/1126.clarification new file mode 100644 index 00000000..3ccb2333 --- /dev/null +++ b/changelogs/client_server/newsfragments/1126.clarification @@ -0,0 +1 @@ +Fix various typos throughout the specification. diff --git a/data/api/client-server/definitions/public_rooms_response.yaml b/data/api/client-server/definitions/public_rooms_response.yaml index eead831e..23f38eff 100644 --- a/data/api/client-server/definitions/public_rooms_response.yaml +++ b/data/api/client-server/definitions/public_rooms_response.yaml @@ -17,7 +17,6 @@ description: A list of the rooms on the server. required: ["chunk"] properties: chunk: - title: "PublicRoomsChunks" type: array description: |- A paginated chunk of public rooms. @@ -25,6 +24,7 @@ properties: allOf: - $ref: "public_rooms_chunk.yaml" - type: object + title: PublicRoomsChunk properties: # Override description of join_rule join_rule: diff --git a/data/api/client-server/space_hierarchy.yaml b/data/api/client-server/space_hierarchy.yaml index 309b99e3..3c1ab388 100644 --- a/data/api/client-server/space_hierarchy.yaml +++ b/data/api/client-server/space_hierarchy.yaml @@ -127,6 +127,7 @@ paths: allOf: - $ref: "definitions/public_rooms_chunk.yaml" - type: object + title: ChildRoomsChunk properties: room_type: type: string @@ -143,6 +144,7 @@ paths: allOf: - $ref: "../../event-schemas/schema/core-event-schema/stripped_state.yaml" - type: object + title: StrippedChildStateEvent properties: origin_server_ts: type: number