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,10 @@
|
|||
# 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 Room Inviting API"
|
||||
version: "1.0.0"
|
||||
host: localhost:8008
|
||||
schemes:
|
||||
- https
|
||||
- http
|
||||
basePath: /_matrix/client/v3
|
||||
consumes:
|
||||
- application/json
|
||||
produces:
|
||||
- application/json
|
||||
securityDefinitions:
|
||||
$ref: definitions/security.yaml
|
||||
title: Matrix Client-Server Room Inviting API
|
||||
version: 1.0.0
|
||||
paths:
|
||||
"/rooms/{roomId}/join":
|
||||
post:
|
||||
|
@ -47,48 +36,55 @@ paths:
|
|||
- accessToken: []
|
||||
parameters:
|
||||
- in: path
|
||||
type: string
|
||||
name: roomId
|
||||
description: The room identifier (not alias) to join.
|
||||
required: true
|
||||
x-example: "!d41d8cd:matrix.org"
|
||||
- in: body
|
||||
name: body
|
||||
required: true
|
||||
example: "!d41d8cd:matrix.org"
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
third_party_signed:
|
||||
allOf:
|
||||
- $ref: "definitions/third_party_signed.yaml"
|
||||
description: |-
|
||||
If supplied, the homeserver must verify that it matches a pending
|
||||
`m.room.third_party_invite` event in the room, and perform
|
||||
key validity checking if required by the event.
|
||||
reason:
|
||||
x-addedInMatrixVersion: "1.1"
|
||||
type: string
|
||||
description: |-
|
||||
Optional reason to be included as the `reason` on the subsequent
|
||||
membership event.
|
||||
example: "Looking for support"
|
||||
type: string
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
third_party_signed:
|
||||
allOf:
|
||||
- $ref: definitions/third_party_signed.yaml
|
||||
description: |-
|
||||
If supplied, the homeserver must verify that it matches a pending
|
||||
`m.room.third_party_invite` event in the room, and perform
|
||||
key validity checking if required by the event.
|
||||
reason:
|
||||
x-addedInMatrixVersion: "1.1"
|
||||
type: string
|
||||
description: |-
|
||||
Optional reason to be included as the `reason` on the subsequent
|
||||
membership event.
|
||||
example: Looking for support
|
||||
required: true
|
||||
responses:
|
||||
200:
|
||||
"200":
|
||||
description: |-
|
||||
The room has been joined.
|
||||
|
||||
The joined room ID must be returned in the `room_id` field.
|
||||
examples:
|
||||
application/json: {
|
||||
"room_id": "!d41d8cd:matrix.org"}
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
room_id:
|
||||
type: string
|
||||
description: The joined room ID.
|
||||
required: ["room_id"]
|
||||
403:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
room_id:
|
||||
type: string
|
||||
description: The joined room ID.
|
||||
required:
|
||||
- room_id
|
||||
examples:
|
||||
response:
|
||||
value: {
|
||||
"room_id": "!d41d8cd:matrix.org"
|
||||
}
|
||||
"403":
|
||||
description: |-
|
||||
You do not have permission to join the room. A meaningful `errcode`
|
||||
and description error text will be returned. Example reasons for rejection are:
|
||||
|
@ -96,15 +92,22 @@ paths:
|
|||
- The room is invite-only and the user was not invited.
|
||||
- The user has been banned from the room.
|
||||
- The room is restricted and the user failed to satisfy any of the conditions.
|
||||
examples:
|
||||
application/json: {
|
||||
"errcode": "M_FORBIDDEN", "error": "You are not invited to this room."}
|
||||
schema:
|
||||
"$ref": "definitions/errors/error.yaml"
|
||||
429:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: definitions/errors/error.yaml
|
||||
examples:
|
||||
response:
|
||||
value: {
|
||||
"errcode": "M_FORBIDDEN",
|
||||
"error": "You are not invited to this room."
|
||||
}
|
||||
"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:
|
||||
- Room membership
|
||||
"/join/{roomIdOrAlias}":
|
||||
|
@ -126,57 +129,67 @@ paths:
|
|||
- accessToken: []
|
||||
parameters:
|
||||
- in: path
|
||||
type: string
|
||||
name: roomIdOrAlias
|
||||
description: The room identifier or alias to join.
|
||||
required: true
|
||||
x-example: "#monkeys:matrix.org"
|
||||
- in: query
|
||||
type: array
|
||||
items:
|
||||
example: "#monkeys:matrix.org"
|
||||
schema:
|
||||
type: string
|
||||
- in: query
|
||||
name: server_name
|
||||
description: |-
|
||||
The servers to attempt to join the room through. One of the servers
|
||||
must be participating in the room.
|
||||
x-example: ["matrix.org", "elsewhere.ca"]
|
||||
- in: body
|
||||
name: body
|
||||
required: true
|
||||
example:
|
||||
- matrix.org
|
||||
- elsewhere.ca
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
third_party_signed:
|
||||
allOf:
|
||||
- $ref: "definitions/third_party_signed.yaml"
|
||||
description: |-
|
||||
If a `third_party_signed` was supplied, the homeserver must verify
|
||||
that it matches a pending `m.room.third_party_invite` event in the
|
||||
room, and perform key validity checking if required by the event.
|
||||
reason:
|
||||
x-addedInMatrixVersion: "1.1"
|
||||
type: string
|
||||
description: |-
|
||||
Optional reason to be included as the `reason` on the subsequent
|
||||
membership event.
|
||||
example: "Looking for support"
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
third_party_signed:
|
||||
allOf:
|
||||
- $ref: definitions/third_party_signed.yaml
|
||||
description: |-
|
||||
If a `third_party_signed` was supplied, the homeserver must verify
|
||||
that it matches a pending `m.room.third_party_invite` event in the
|
||||
room, and perform key validity checking if required by the event.
|
||||
reason:
|
||||
x-addedInMatrixVersion: "1.1"
|
||||
type: string
|
||||
description: |-
|
||||
Optional reason to be included as the `reason` on the subsequent
|
||||
membership event.
|
||||
example: Looking for support
|
||||
required: true
|
||||
responses:
|
||||
200:
|
||||
"200":
|
||||
description: |-
|
||||
The room has been joined.
|
||||
|
||||
The joined room ID must be returned in the `room_id` field.
|
||||
examples:
|
||||
application/json: {
|
||||
"room_id": "!d41d8cd:matrix.org"}
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
room_id:
|
||||
type: string
|
||||
description: The joined room ID.
|
||||
required: ["room_id"]
|
||||
403:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
room_id:
|
||||
type: string
|
||||
description: The joined room ID.
|
||||
required:
|
||||
- room_id
|
||||
examples:
|
||||
response:
|
||||
value: {
|
||||
"room_id": "!d41d8cd:matrix.org"
|
||||
}
|
||||
"403":
|
||||
description: |-
|
||||
You do not have permission to join the room. A meaningful `errcode`
|
||||
and description error text will be returned. Example reasons for rejection are:
|
||||
|
@ -184,14 +197,36 @@ paths:
|
|||
- The room is invite-only and the user was not invited.
|
||||
- The user has been banned from the room.
|
||||
- The room is restricted and the user failed to satisfy any of the conditions.
|
||||
examples:
|
||||
application/json: {
|
||||
"errcode": "M_FORBIDDEN", "error": "You are not invited to this room."}
|
||||
schema:
|
||||
"$ref": "definitions/errors/error.yaml"
|
||||
429:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: definitions/errors/error.yaml
|
||||
examples:
|
||||
response:
|
||||
value: {
|
||||
"errcode": "M_FORBIDDEN",
|
||||
"error": "You are not invited to this room."
|
||||
}
|
||||
"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:
|
||||
- Room membership
|
||||
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