mirror of
https://github.com/matrix-org/matrix-spec
synced 2025-12-24 09:58:38 +01:00
According the the openapi spec, examples for responses and schemas should be raw objects rather than being json strings. (It's unclear what non-json examples should look like...). The swagger UI used to support json strings, but no longer does. In short, let's turn the json strings into their raw formats.
106 lines
3.3 KiB
YAML
106 lines
3.3 KiB
YAML
# Copyright 2016 OpenMarket Ltd
|
|
#
|
|
# 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 Client-Server Room Leaving API"
|
|
version: "1.0.0"
|
|
host: localhost:8008
|
|
schemes:
|
|
- https
|
|
- http
|
|
basePath: /_matrix/client/%CLIENT_MAJOR_VERSION%
|
|
consumes:
|
|
- application/json
|
|
produces:
|
|
- application/json
|
|
securityDefinitions:
|
|
$ref: definitions/security.yaml
|
|
paths:
|
|
"/rooms/{roomId}/leave":
|
|
post:
|
|
summary: Stop the requesting user participating in a particular room.
|
|
description: |-
|
|
This API stops a user participating in a particular room.
|
|
|
|
If the user was already in the room, they will no longer be able to see
|
|
new events in the room. If the room requires an invite to join, they
|
|
will need to be re-invited before they can re-join.
|
|
|
|
If the user was invited to the room, but had not joined, this call
|
|
serves to reject the invite.
|
|
|
|
The user will still be allowed to retrieve history from the room which
|
|
they were previously allowed to see.
|
|
security:
|
|
- accessToken: []
|
|
parameters:
|
|
- in: path
|
|
type: string
|
|
name: roomId
|
|
description: The room identifier to leave.
|
|
required: true
|
|
x-example: "!nkl290a:matrix.org"
|
|
responses:
|
|
200:
|
|
description: |-
|
|
The room has been left.
|
|
examples:
|
|
application/json: {
|
|
}
|
|
schema:
|
|
type: object
|
|
429:
|
|
description: This request was rate-limited.
|
|
schema:
|
|
"$ref": "definitions/error.yaml"
|
|
tags:
|
|
- Room membership
|
|
"/rooms/{roomId}/forget":
|
|
post:
|
|
summary: Stop the requesting user remembering about a particular room.
|
|
description: |-
|
|
This API stops a user remembering about a particular room.
|
|
|
|
In general, history is a first class citizen in Matrix. After this API
|
|
is called, however, a user will no longer be able to retrieve history
|
|
for this room. If all users on a homeserver forget a room, the room is
|
|
eligible for deletion from that homeserver.
|
|
|
|
If the user is currently joined to the room, they will implicitly leave
|
|
the room as part of this API call.
|
|
security:
|
|
- accessToken: []
|
|
parameters:
|
|
- in: path
|
|
type: string
|
|
name: roomId
|
|
description: The room identifier to forget.
|
|
required: true
|
|
x-example: "!au1ba7o:matrix.org"
|
|
responses:
|
|
200:
|
|
description: |-
|
|
The room has been forgotten.
|
|
examples:
|
|
application/json: {
|
|
}
|
|
schema:
|
|
type: object
|
|
429:
|
|
description: This request was rate-limited.
|
|
schema:
|
|
"$ref": "definitions/error.yaml"
|
|
tags:
|
|
- Room membership
|