From be86e638c536fe7220da44061c943a228234ed43 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Mon, 5 Apr 2021 20:45:36 -0600 Subject: [PATCH 1/4] Add identity service versions API Specs [MSC2320](https://github.com/matrix-org/matrix-doc/pull/2320) Built upon https://github.com/matrix-org/matrix-doc/pull/3094 --- content/identity-service-api.md | 2 ++ data/api/identity/versions.yaml | 51 +++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 data/api/identity/versions.yaml diff --git a/content/identity-service-api.md b/content/identity-service-api.md index 60115306..ed5e8a0e 100644 --- a/content/identity-service-api.md +++ b/content/identity-service-api.md @@ -103,6 +103,8 @@ the third party identifier. `M_UNKNOWN` An unknown error has occurred. +{{% http-api spec="identity" api="versions" %}} + ## Privacy Identity is a privacy-sensitive issue. While the identity server exists diff --git a/data/api/identity/versions.yaml b/data/api/identity/versions.yaml new file mode 100644 index 00000000..a3869665 --- /dev/null +++ b/data/api/identity/versions.yaml @@ -0,0 +1,51 @@ +# Copyright 2021 The Matrix.org Foundation C.I.C. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +swagger: '2.0' +info: + title: "Matrix Identity Service Versions API" + version: "1.0.0" +host: localhost:8090 +schemes: + - https +basePath: /_matrix/identity +produces: + - application/json +paths: + "/versions": + get: + summary: Gets the versions of the specification supported by the server. + description: |- + Gets the versions of the specification supported by the server. + + Values will take the form `rX.Y.Z`. + + All supported versions, including patch versions, are reported by the server. + operationId: getVersions + responses: + 200: + description: The versions supported by the server. + examples: + application/json: { + "versions": ["r0.1.0", "r0.2.0", "r0.2.1"] + } + schema: + type: object + properties: + versions: + type: array + description: The supported versions. + items: + type: string + description: The supported versions + required: ['versions'] From de19b86eedf4ec835cbea1e25f84e636aa74181c Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Mon, 5 Apr 2021 20:47:15 -0600 Subject: [PATCH 2/4] Changelog --- changelogs/identity_service/newsfragments/3101.new | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelogs/identity_service/newsfragments/3101.new diff --git a/changelogs/identity_service/newsfragments/3101.new b/changelogs/identity_service/newsfragments/3101.new new file mode 100644 index 00000000..a31567c3 --- /dev/null +++ b/changelogs/identity_service/newsfragments/3101.new @@ -0,0 +1 @@ +Add `/versions` API as per [MSC2320](https://github.com/matrix-org/matrix-doc/pull/2320). \ No newline at end of file From 57f609cf1b6624310c0ec22f533576bad28f6c01 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Sun, 2 May 2021 00:13:48 -0600 Subject: [PATCH 3/4] Typo fixes --- changelogs/identity_service/newsfragments/3101.new | 2 +- data/api/identity/versions.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/changelogs/identity_service/newsfragments/3101.new b/changelogs/identity_service/newsfragments/3101.new index a31567c3..e6e98b92 100644 --- a/changelogs/identity_service/newsfragments/3101.new +++ b/changelogs/identity_service/newsfragments/3101.new @@ -1 +1 @@ -Add `/versions` API as per [MSC2320](https://github.com/matrix-org/matrix-doc/pull/2320). \ No newline at end of file +Add `GET /_matrix/identity/versions` API as per [MSC2320](https://github.com/matrix-org/matrix-doc/pull/2320). \ No newline at end of file diff --git a/data/api/identity/versions.yaml b/data/api/identity/versions.yaml index a3869665..04f2f66d 100644 --- a/data/api/identity/versions.yaml +++ b/data/api/identity/versions.yaml @@ -47,5 +47,5 @@ paths: description: The supported versions. items: type: string - description: The supported versions + description: The supported versions. required: ['versions'] From c1d1f88a55da3943dc7411e8b9f94231c501e2b1 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Tue, 4 May 2021 09:23:48 -0600 Subject: [PATCH 4/4] Update data/api/identity/versions.yaml Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com> --- data/api/identity/versions.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/api/identity/versions.yaml b/data/api/identity/versions.yaml index 04f2f66d..5d0a01c4 100644 --- a/data/api/identity/versions.yaml +++ b/data/api/identity/versions.yaml @@ -37,8 +37,8 @@ paths: description: The versions supported by the server. examples: application/json: { - "versions": ["r0.1.0", "r0.2.0", "r0.2.1"] - } + "versions": ["r0.1.0", "r0.2.0", "r0.2.1"] + } schema: type: object properties: