Skip to content

Commit 3d217e0

Browse files
turt2liverichvdh
authored andcommitted
Merge pull request #3101 from matrix-org/travis/spec/MSC2320-identity-versions
Add identity service versions API
2 parents c11efb3 + c1d1f88 commit 3d217e0

File tree

3 files changed

+54
-0
lines changed

3 files changed

+54
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add `GET /_matrix/identity/versions` API as per [MSC2320](https://github.com/matrix-org/matrix-doc/pull/2320).

content/identity-service-api.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,8 @@ the third party identifier.
103103
`M_UNKNOWN`
104104
An unknown error has occurred.
105105

106+
{{% http-api spec="identity" api="versions" %}}
107+
106108
## Privacy
107109

108110
Identity is a privacy-sensitive issue. While the identity server exists

data/api/identity/versions.yaml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Copyright 2021 The Matrix.org Foundation C.I.C.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
swagger: '2.0'
15+
info:
16+
title: "Matrix Identity Service Versions API"
17+
version: "1.0.0"
18+
host: localhost:8090
19+
schemes:
20+
- https
21+
basePath: /_matrix/identity
22+
produces:
23+
- application/json
24+
paths:
25+
"/versions":
26+
get:
27+
summary: Gets the versions of the specification supported by the server.
28+
description: |-
29+
Gets the versions of the specification supported by the server.
30+
31+
Values will take the form `rX.Y.Z`. <!-- TODO: TravisR: Global versioning spec -->
32+
33+
All supported versions, including patch versions, are reported by the server.
34+
operationId: getVersions
35+
responses:
36+
200:
37+
description: The versions supported by the server.
38+
examples:
39+
application/json: {
40+
"versions": ["r0.1.0", "r0.2.0", "r0.2.1"]
41+
}
42+
schema:
43+
type: object
44+
properties:
45+
versions:
46+
type: array
47+
description: The supported versions.
48+
items:
49+
type: string
50+
description: The supported versions.
51+
required: ['versions']

0 commit comments

Comments
 (0)