From a7d3a73bd8fe6ad07a8abc02dbb11d934b276dbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Commaille?= Date: Wed, 4 Sep 2024 14:18:57 +0200 Subject: [PATCH 1/3] Add the deprecated field to OpenAPI definitions and JSON Schemas MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I did a quick search of the "deprecated" word in the data folder and set the field where the description says that a property is deprecated. This does not change the rendering of the spec because the descriptions already talk about the deprecation, but it can be used by tools that rely on the OpenAPI definitions and JSON Schemas. Signed-off-by: Kévin Commaille --- data/api/client-server/joining.yaml | 1 + data/api/client-server/knocking.yaml | 1 + data/api/client-server/login.yaml | 4 ++++ data/api/client-server/registration.yaml | 1 + data/event-schemas/schema/m.room.encrypted.yaml | 2 ++ 5 files changed, 9 insertions(+) diff --git a/data/api/client-server/joining.yaml b/data/api/client-server/joining.yaml index aead420c3..dda0d8673 100644 --- a/data/api/client-server/joining.yaml +++ b/data/api/client-server/joining.yaml @@ -139,6 +139,7 @@ paths: type: string - in: query name: server_name + deprecated: true x-changedInMatrixVersion: "1.12": |- This parameter has been deprecated in favour of `via` and will be removed in diff --git a/data/api/client-server/knocking.yaml b/data/api/client-server/knocking.yaml index 39a928e84..085aa74f5 100644 --- a/data/api/client-server/knocking.yaml +++ b/data/api/client-server/knocking.yaml @@ -50,6 +50,7 @@ paths: type: string - in: query name: server_name + deprecated: true x-changedInMatrixVersion: "1.12": |- This parameter has been deprecated in favour of `via` and will be removed in diff --git a/data/api/client-server/login.yaml b/data/api/client-server/login.yaml index b37d1742d..385eb33b6 100644 --- a/data/api/client-server/login.yaml +++ b/data/api/client-server/login.yaml @@ -119,15 +119,18 @@ paths: $ref: definitions/user_identifier.yaml user: type: string + deprecated: true description: The fully qualified user ID or just local part of the user ID, to log in. Deprecated in favour of `identifier`. medium: type: string + deprecated: true description: When logging in using a third-party identifier, the medium of the identifier. Must be 'email'. Deprecated in favour of `identifier`. address: type: string + deprecated: true description: Third-party identifier for the user. Deprecated in favour of `identifier`. password: @@ -194,6 +197,7 @@ paths: x-addedInMatrixVersion: "1.3" home_server: type: string + deprecated: true description: |- The server_name of the homeserver on which the account has been registered. diff --git a/data/api/client-server/registration.yaml b/data/api/client-server/registration.yaml index 84aef5b12..1dd314b8b 100644 --- a/data/api/client-server/registration.yaml +++ b/data/api/client-server/registration.yaml @@ -169,6 +169,7 @@ paths: x-addedInMatrixVersion: "1.3" home_server: type: string + deprecated: true description: |- The server_name of the homeserver on which the account has been registered. diff --git a/data/event-schemas/schema/m.room.encrypted.yaml b/data/event-schemas/schema/m.room.encrypted.yaml index 95e05ff71..f608a6e2a 100644 --- a/data/event-schemas/schema/m.room.encrypted.yaml +++ b/data/event-schemas/schema/m.room.encrypted.yaml @@ -41,6 +41,7 @@ properties: Olm event. For more details, see [Messaging Algorithms](/client-server-api/#messaging-algorithms). sender_key: type: string + deprecated: true x-changedInMatrixVersion: "1.3": |- Previously this field was required, however given it offers no additional @@ -56,6 +57,7 @@ properties: for more information. device_id: type: string + deprecated: true x-changedInMatrixVersion: "1.3": |- Previously this field was required for Megolm messages, however given it From ef108330546895cccbe059e19af9e5399b9ed9fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Commaille?= Date: Wed, 4 Sep 2024 14:20:43 +0200 Subject: [PATCH 2/3] Add changelog MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Kévin Commaille --- changelogs/internal/newsfragments/1940.clarification | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelogs/internal/newsfragments/1940.clarification diff --git a/changelogs/internal/newsfragments/1940.clarification b/changelogs/internal/newsfragments/1940.clarification new file mode 100644 index 000000000..d622ed7f9 --- /dev/null +++ b/changelogs/internal/newsfragments/1940.clarification @@ -0,0 +1 @@ +Add the deprecated field to properties of OpenAPI definitions and JSON Schemas. From 3f5493f5fe89797b918ff2b710b11c6e23649fed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Commaille?= Date: Thu, 5 Sep 2024 10:31:40 +0200 Subject: [PATCH 3/3] Fix changelog MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Kévin Commaille --- changelogs/internal/newsfragments/1940.clarification | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelogs/internal/newsfragments/1940.clarification b/changelogs/internal/newsfragments/1940.clarification index d622ed7f9..158854332 100644 --- a/changelogs/internal/newsfragments/1940.clarification +++ b/changelogs/internal/newsfragments/1940.clarification @@ -1 +1 @@ -Add the deprecated field to properties of OpenAPI definitions and JSON Schemas. +Add the `deprecated` field to properties of OpenAPI definitions and JSON Schemas.