Upgrade Swagger data to OpenAPI 3.1 (#1310)
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
This commit is contained in:
parent
c64a616d54
commit
45b6aaf07a
118 changed files with 15064 additions and 12727 deletions
|
@ -11,21 +11,12 @@
|
|||
# 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'
|
||||
openapi: 3.1.0
|
||||
info:
|
||||
title: "Matrix Client-Server Account Identification API"
|
||||
version: "1.0.0"
|
||||
host: localhost:8008
|
||||
schemes:
|
||||
- https
|
||||
- http
|
||||
basePath: /_matrix/client/v3
|
||||
produces:
|
||||
- application/json
|
||||
securityDefinitions:
|
||||
$ref: definitions/security.yaml
|
||||
title: Matrix Client-Server Account Identification API
|
||||
version: 1.0.0
|
||||
paths:
|
||||
"/account/whoami":
|
||||
/account/whoami:
|
||||
get:
|
||||
summary: Gets information about the owner of an access token.
|
||||
description: |-
|
||||
|
@ -40,61 +31,85 @@ paths:
|
|||
operationId: getTokenOwner
|
||||
security:
|
||||
- accessToken: []
|
||||
parameters: []
|
||||
responses:
|
||||
200:
|
||||
description:
|
||||
The token belongs to a known user.
|
||||
examples:
|
||||
application/json: {
|
||||
"user_id": "@joe:example.org",
|
||||
"device_id": "ABC1234"
|
||||
}
|
||||
schema:
|
||||
type: object
|
||||
required: ["user_id"]
|
||||
properties:
|
||||
user_id:
|
||||
type: string
|
||||
description: The user ID that owns the access token.
|
||||
device_id:
|
||||
x-addedInMatrixVersion: "1.1"
|
||||
type: string
|
||||
description: |-
|
||||
Device ID associated with the access token. If no device
|
||||
is associated with the access token (such as in the case
|
||||
of application services) then this field can be omitted.
|
||||
Otherwise this is required.
|
||||
is_guest:
|
||||
x-addedInMatrixVersion: "1.2"
|
||||
type: boolean
|
||||
description: |-
|
||||
When `true`, the user is a [Guest User](#guest-access). When
|
||||
not present or `false`, the user is presumed to be a non-guest
|
||||
user.
|
||||
401:
|
||||
description:
|
||||
The token is not recognised
|
||||
examples:
|
||||
application/json: {
|
||||
"errcode": "M_UNKNOWN_TOKEN",
|
||||
"error": "Unrecognised access token."
|
||||
}
|
||||
schema:
|
||||
"$ref": "definitions/errors/error.yaml"
|
||||
403:
|
||||
description:
|
||||
The appservice cannot masquerade as the user or has not registered them.
|
||||
examples:
|
||||
application/json: {
|
||||
"errcode": "M_FORBIDDEN",
|
||||
"error": "Application service has not registered this user."
|
||||
}
|
||||
schema:
|
||||
"$ref": "definitions/errors/error.yaml"
|
||||
429:
|
||||
"200":
|
||||
description: The token belongs to a known user.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
required:
|
||||
- user_id
|
||||
properties:
|
||||
user_id:
|
||||
type: string
|
||||
description: The user ID that owns the access token.
|
||||
device_id:
|
||||
x-addedInMatrixVersion: "1.1"
|
||||
type: string
|
||||
description: |-
|
||||
Device ID associated with the access token. If no device
|
||||
is associated with the access token (such as in the case
|
||||
of application services) then this field can be omitted.
|
||||
Otherwise this is required.
|
||||
is_guest:
|
||||
x-addedInMatrixVersion: "1.2"
|
||||
type: boolean
|
||||
description: |-
|
||||
When `true`, the user is a [Guest User](#guest-access). When
|
||||
not present or `false`, the user is presumed to be a non-guest
|
||||
user.
|
||||
examples:
|
||||
response:
|
||||
value: {
|
||||
"user_id": "@joe:example.org",
|
||||
"device_id": "ABC1234"
|
||||
}
|
||||
"401":
|
||||
description: The token is not recognised
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: definitions/errors/error.yaml
|
||||
examples:
|
||||
response:
|
||||
value: {
|
||||
"errcode": "M_UNKNOWN_TOKEN",
|
||||
"error": "Unrecognised access token."
|
||||
}
|
||||
"403":
|
||||
description: The appservice cannot masquerade as the user or has not registered
|
||||
them.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: definitions/errors/error.yaml
|
||||
examples:
|
||||
response:
|
||||
value: {
|
||||
"errcode": "M_FORBIDDEN",
|
||||
"error": "Application service has not registered this user."
|
||||
}
|
||||
"429":
|
||||
description: This request was rate-limited.
|
||||
schema:
|
||||
"$ref": "definitions/errors/rate_limited.yaml"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: definitions/errors/rate_limited.yaml
|
||||
tags:
|
||||
- Session management
|
||||
servers:
|
||||
- url: "{protocol}://{hostname}{basePath}"
|
||||
variables:
|
||||
protocol:
|
||||
enum:
|
||||
- http
|
||||
- https
|
||||
default: https
|
||||
hostname:
|
||||
default: localhost:8008
|
||||
basePath:
|
||||
default: /_matrix/client/v3
|
||||
components:
|
||||
securitySchemes:
|
||||
$ref: definitions/security.yaml
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue