mirror of
https://github.com/matrix-org/matrix-spec
synced 2026-05-02 23:24:14 +02:00
Improvements to CS API "Rooms" section (#2358)
Some checks are pending
Spec / 🔎 Validate OpenAPI specifications (push) Waiting to run
Spec / 🔎 Check Event schema examples (push) Waiting to run
Spec / 🔎 Check OpenAPI definitions examples (push) Waiting to run
Spec / 🔎 Check JSON Schemas inline examples (push) Waiting to run
Spec / ⚙️ Calculate baseURL for later jobs (push) Waiting to run
Spec / 🐍 Build OpenAPI definitions (push) Blocked by required conditions
Spec / 📢 Run towncrier for changelog (push) Waiting to run
Spec / 📖 Build the spec (push) Blocked by required conditions
Spec / 🔎 Validate generated HTML (push) Blocked by required conditions
Spec / 📖 Build the historical backup spec (push) Blocked by required conditions
Spec / Create release (push) Blocked by required conditions
Spell Check / Spell Check with Typos (push) Waiting to run
Some checks are pending
Spec / 🔎 Validate OpenAPI specifications (push) Waiting to run
Spec / 🔎 Check Event schema examples (push) Waiting to run
Spec / 🔎 Check OpenAPI definitions examples (push) Waiting to run
Spec / 🔎 Check JSON Schemas inline examples (push) Waiting to run
Spec / ⚙️ Calculate baseURL for later jobs (push) Waiting to run
Spec / 🐍 Build OpenAPI definitions (push) Blocked by required conditions
Spec / 📢 Run towncrier for changelog (push) Waiting to run
Spec / 📖 Build the spec (push) Blocked by required conditions
Spec / 🔎 Validate generated HTML (push) Blocked by required conditions
Spec / 📖 Build the historical backup spec (push) Blocked by required conditions
Spec / Create release (push) Blocked by required conditions
Spell Check / Spell Check with Typos (push) Waiting to run
* Clarify string formats of rooms endpoints Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr> * Use description list for room memberships Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr> * Add changelog Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr> * Add link to m.room.join_rules definition Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr> Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com> --------- Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr> Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
This commit is contained in:
parent
9fd3c00086
commit
160339e580
|
|
@ -0,0 +1 @@
|
||||||
|
Clarify formats of string types.
|
||||||
|
|
@ -3936,28 +3936,28 @@ room to send events in the room:
|
||||||
|
|
||||||
Some rooms require that users be invited to it before they can join;
|
Some rooms require that users be invited to it before they can join;
|
||||||
others allow anyone to join. Whether a given room is an "invite-only"
|
others allow anyone to join. Whether a given room is an "invite-only"
|
||||||
room is determined by the room config key `m.room.join_rules`. It can
|
room is determined by the room state event [`m.room.join_rules`](#mroomjoin_rules).
|
||||||
have one of the following values:
|
It can have one of the following values:
|
||||||
|
|
||||||
`public`
|
`public`
|
||||||
This room is free for anyone to join without an invite.
|
: This room is free for anyone to join without an invite.
|
||||||
|
|
||||||
`invite`
|
`invite`
|
||||||
This room can only be joined if you were invited.
|
: This room can only be joined if you were invited.
|
||||||
|
|
||||||
`knock`
|
`knock`
|
||||||
This room can only be joined if you were invited, and allows anyone to
|
: This room can only be joined if you were invited, and allows anyone to
|
||||||
request an invite to the room. Note that this join rule is only available
|
request an invite to the room. Note that this join rule is only available
|
||||||
in room versions [which support knocking](/rooms/#feature-matrix).
|
in room versions [which support knocking](/rooms/#feature-matrix).
|
||||||
|
|
||||||
{{% added-in v="1.2" %}} `restricted`
|
`restricted`
|
||||||
This room can be joined if you were invited or if you are a member of another
|
: {{% added-in v="1.2" %}} This room can be joined if you were invited or if you are a member of another
|
||||||
room listed in the join rules. If the server cannot verify membership for any
|
room listed in the join rules. If the server cannot verify membership for any
|
||||||
of the listed rooms then you can only join with an invite. Note that this rule
|
of the listed rooms then you can only join with an invite. Note that this rule
|
||||||
is only expected to work in room versions [which support it](/rooms/#feature-matrix).
|
is only expected to work in room versions [which support it](/rooms/#feature-matrix).
|
||||||
|
|
||||||
{{% added-in v="1.3" %}} `knock_restricted`
|
`knock_restricted`
|
||||||
This room can be joined as though it was `restricted` *or* `knock`. If you
|
: {{% added-in v="1.3" %}} This room can be joined as though it was `restricted` *or* `knock`. If you
|
||||||
interact with the room using knocking, the `knock` rule takes effect whereas
|
interact with the room using knocking, the `knock` rule takes effect whereas
|
||||||
trying to join the room without an invite applies the `restricted` join rule.
|
trying to join the room without an invite applies the `restricted` join rule.
|
||||||
Note that this rule is only expected to work in room versions
|
Note that this rule is only expected to work in room versions
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,8 @@ paths:
|
||||||
example: "!e42d8c:matrix.org"
|
example: "!e42d8c:matrix.org"
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
|
format: mx-room-id
|
||||||
|
pattern: "^!"
|
||||||
requestBody:
|
requestBody:
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
|
|
@ -50,6 +52,8 @@ paths:
|
||||||
user_id:
|
user_id:
|
||||||
type: string
|
type: string
|
||||||
description: The fully qualified user ID of the user being banned.
|
description: The fully qualified user ID of the user being banned.
|
||||||
|
format: mx-user-id
|
||||||
|
pattern: "^@"
|
||||||
reason:
|
reason:
|
||||||
x-addedInMatrixVersion: "1.1"
|
x-addedInMatrixVersion: "1.1"
|
||||||
type: string
|
type: string
|
||||||
|
|
@ -108,6 +112,8 @@ paths:
|
||||||
example: "!e42d8c:matrix.org"
|
example: "!e42d8c:matrix.org"
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
|
format: mx-room-id
|
||||||
|
pattern: "^!"
|
||||||
requestBody:
|
requestBody:
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
|
|
@ -121,6 +127,8 @@ paths:
|
||||||
user_id:
|
user_id:
|
||||||
type: string
|
type: string
|
||||||
description: The fully qualified user ID of the user being unbanned.
|
description: The fully qualified user ID of the user being unbanned.
|
||||||
|
format: mx-user-id
|
||||||
|
pattern: "^@"
|
||||||
reason:
|
reason:
|
||||||
x-addedInMatrixVersion: "1.1"
|
x-addedInMatrixVersion: "1.1"
|
||||||
type: string
|
type: string
|
||||||
|
|
|
||||||
|
|
@ -140,6 +140,8 @@ paths:
|
||||||
server to invite everyone in the list to the newly created room.
|
server to invite everyone in the list to the newly created room.
|
||||||
items:
|
items:
|
||||||
type: string
|
type: string
|
||||||
|
format: mx-user-id
|
||||||
|
pattern: "^@"
|
||||||
invite_3pid:
|
invite_3pid:
|
||||||
type: array
|
type: array
|
||||||
description: |-
|
description: |-
|
||||||
|
|
@ -241,6 +243,8 @@ paths:
|
||||||
room_id:
|
room_id:
|
||||||
type: string
|
type: string
|
||||||
description: The created room's ID.
|
description: The created room's ID.
|
||||||
|
format: mx-room-id
|
||||||
|
pattern: "^!"
|
||||||
required:
|
required:
|
||||||
- room_id
|
- room_id
|
||||||
examples:
|
examples:
|
||||||
|
|
|
||||||
|
|
@ -20,10 +20,14 @@ properties:
|
||||||
sender:
|
sender:
|
||||||
type: string
|
type: string
|
||||||
description: The Matrix ID of the user who issued the invite.
|
description: The Matrix ID of the user who issued the invite.
|
||||||
|
format: mx-user-id
|
||||||
|
pattern: "^@"
|
||||||
example: "@alice:example.org"
|
example: "@alice:example.org"
|
||||||
mxid:
|
mxid:
|
||||||
type: string
|
type: string
|
||||||
description: The Matrix ID of the invitee.
|
description: The Matrix ID of the invitee.
|
||||||
|
format: mx-user-id
|
||||||
|
pattern: "^@"
|
||||||
example: "@bob:example.org"
|
example: "@bob:example.org"
|
||||||
token:
|
token:
|
||||||
type: string
|
type: string
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,8 @@ paths:
|
||||||
example: "#monkeys:matrix.org"
|
example: "#monkeys:matrix.org"
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
|
format: mx-room-alias
|
||||||
|
pattern: "^#"
|
||||||
requestBody:
|
requestBody:
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
|
|
@ -42,6 +44,8 @@ paths:
|
||||||
room_id:
|
room_id:
|
||||||
type: string
|
type: string
|
||||||
description: The room ID to set.
|
description: The room ID to set.
|
||||||
|
format: mx-room-id
|
||||||
|
pattern: "^!"
|
||||||
required:
|
required:
|
||||||
- room_id
|
- room_id
|
||||||
example: {
|
example: {
|
||||||
|
|
@ -104,6 +108,8 @@ paths:
|
||||||
example: "#monkeys:matrix.org"
|
example: "#monkeys:matrix.org"
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
|
format: mx-room-alias
|
||||||
|
pattern: "^#"
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: The room ID and other information for this alias.
|
description: The room ID and other information for this alias.
|
||||||
|
|
@ -115,12 +121,15 @@ paths:
|
||||||
room_id:
|
room_id:
|
||||||
type: string
|
type: string
|
||||||
description: The room ID for this room alias.
|
description: The room ID for this room alias.
|
||||||
|
format: mx-room-id
|
||||||
|
pattern: "^!"
|
||||||
servers:
|
servers:
|
||||||
type: array
|
type: array
|
||||||
description: A list of servers that are aware of this room alias.
|
description: A list of servers that are aware of this room alias.
|
||||||
items:
|
items:
|
||||||
type: string
|
type: string
|
||||||
description: A server which is aware of this room alias.
|
description: A server which is aware of this room alias.
|
||||||
|
format: mx-server-name
|
||||||
examples:
|
examples:
|
||||||
response:
|
response:
|
||||||
value: {
|
value: {
|
||||||
|
|
@ -185,6 +194,8 @@ paths:
|
||||||
example: "#monkeys:matrix.org"
|
example: "#monkeys:matrix.org"
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
|
format: mx-room-alias
|
||||||
|
pattern: "^#"
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: The mapping was deleted.
|
description: The mapping was deleted.
|
||||||
|
|
@ -241,6 +252,8 @@ paths:
|
||||||
example: "!abc123:example.org"
|
example: "!abc123:example.org"
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
|
format: mx-room-id
|
||||||
|
pattern: "^!"
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: The list of local aliases for the room.
|
description: The list of local aliases for the room.
|
||||||
|
|
@ -254,6 +267,8 @@ paths:
|
||||||
description: The server's local aliases on the room. Can be empty.
|
description: The server's local aliases on the room. Can be empty.
|
||||||
items:
|
items:
|
||||||
type: string
|
type: string
|
||||||
|
format: mx-room-alias
|
||||||
|
pattern: "^#"
|
||||||
required:
|
required:
|
||||||
- aliases
|
- aliases
|
||||||
examples:
|
examples:
|
||||||
|
|
|
||||||
|
|
@ -48,6 +48,8 @@ paths:
|
||||||
example: "!d41d8cd:matrix.org"
|
example: "!d41d8cd:matrix.org"
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
|
format: mx-room-id
|
||||||
|
pattern: "^!"
|
||||||
requestBody:
|
requestBody:
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
|
|
@ -61,6 +63,8 @@ paths:
|
||||||
user_id:
|
user_id:
|
||||||
type: string
|
type: string
|
||||||
description: The fully qualified user ID of the invitee.
|
description: The fully qualified user ID of the invitee.
|
||||||
|
format: mx-user-id
|
||||||
|
pattern: "^@"
|
||||||
reason:
|
reason:
|
||||||
x-addedInMatrixVersion: "1.1"
|
x-addedInMatrixVersion: "1.1"
|
||||||
type: string
|
type: string
|
||||||
|
|
|
||||||
|
|
@ -43,6 +43,8 @@ paths:
|
||||||
example: "!d41d8cd:matrix.org"
|
example: "!d41d8cd:matrix.org"
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
|
format: mx-room-id
|
||||||
|
pattern: "^!"
|
||||||
requestBody:
|
requestBody:
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
|
|
@ -78,6 +80,8 @@ paths:
|
||||||
room_id:
|
room_id:
|
||||||
type: string
|
type: string
|
||||||
description: The joined room ID.
|
description: The joined room ID.
|
||||||
|
format: mx-room-id
|
||||||
|
pattern: "^!"
|
||||||
required:
|
required:
|
||||||
- room_id
|
- room_id
|
||||||
examples:
|
examples:
|
||||||
|
|
@ -136,7 +140,13 @@ paths:
|
||||||
required: true
|
required: true
|
||||||
example: "#monkeys:matrix.org"
|
example: "#monkeys:matrix.org"
|
||||||
schema:
|
schema:
|
||||||
type: string
|
oneOf:
|
||||||
|
- type: string
|
||||||
|
format: mx-room-id
|
||||||
|
pattern: "^!"
|
||||||
|
- type: string
|
||||||
|
format: mx-room-alias
|
||||||
|
pattern: "^#"
|
||||||
- in: query
|
- in: query
|
||||||
name: via
|
name: via
|
||||||
x-addedInMatrixVersion: "1.12"
|
x-addedInMatrixVersion: "1.12"
|
||||||
|
|
@ -150,6 +160,7 @@ paths:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
type: string
|
type: string
|
||||||
|
format: mx-server-name
|
||||||
requestBody:
|
requestBody:
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
|
|
@ -185,6 +196,8 @@ paths:
|
||||||
room_id:
|
room_id:
|
||||||
type: string
|
type: string
|
||||||
description: The joined room ID.
|
description: The joined room ID.
|
||||||
|
format: mx-room-id
|
||||||
|
pattern: "^!"
|
||||||
required:
|
required:
|
||||||
- room_id
|
- room_id
|
||||||
examples:
|
examples:
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,8 @@ paths:
|
||||||
example: "!e42d8c:matrix.org"
|
example: "!e42d8c:matrix.org"
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
|
format: mx-room-id
|
||||||
|
pattern: "^!"
|
||||||
requestBody:
|
requestBody:
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
|
|
@ -52,6 +54,8 @@ paths:
|
||||||
user_id:
|
user_id:
|
||||||
type: string
|
type: string
|
||||||
description: The fully qualified user ID of the user being kicked.
|
description: The fully qualified user ID of the user being kicked.
|
||||||
|
format: mx-user-id
|
||||||
|
pattern: "^@"
|
||||||
reason:
|
reason:
|
||||||
type: string
|
type: string
|
||||||
description: |-
|
description: |-
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,13 @@ paths:
|
||||||
required: true
|
required: true
|
||||||
example: "#monkeys:matrix.org"
|
example: "#monkeys:matrix.org"
|
||||||
schema:
|
schema:
|
||||||
type: string
|
oneOf:
|
||||||
|
- type: string
|
||||||
|
format: mx-room-id
|
||||||
|
pattern: "^!"
|
||||||
|
- type: string
|
||||||
|
format: mx-room-alias
|
||||||
|
pattern: "^#"
|
||||||
- in: query
|
- in: query
|
||||||
name: via
|
name: via
|
||||||
x-addedInMatrixVersion: "1.12"
|
x-addedInMatrixVersion: "1.12"
|
||||||
|
|
@ -61,6 +67,7 @@ paths:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
type: string
|
type: string
|
||||||
|
format: mx-server-name
|
||||||
requestBody:
|
requestBody:
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
|
|
@ -88,6 +95,8 @@ paths:
|
||||||
room_id:
|
room_id:
|
||||||
type: string
|
type: string
|
||||||
description: The knocked room ID.
|
description: The knocked room ID.
|
||||||
|
format: mx-room-id
|
||||||
|
pattern: "^!"
|
||||||
required:
|
required:
|
||||||
- room_id
|
- room_id
|
||||||
examples:
|
examples:
|
||||||
|
|
|
||||||
|
|
@ -54,6 +54,8 @@ paths:
|
||||||
example: "!nkl290a:matrix.org"
|
example: "!nkl290a:matrix.org"
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
|
format: mx-room-id
|
||||||
|
pattern: "^!"
|
||||||
requestBody:
|
requestBody:
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
|
|
@ -113,6 +115,8 @@ paths:
|
||||||
example: "!au1ba7o:matrix.org"
|
example: "!au1ba7o:matrix.org"
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
|
format: mx-room-id
|
||||||
|
pattern: "^!"
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: The room has been forgotten.
|
description: The room has been forgotten.
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,8 @@ paths:
|
||||||
description: The ID of each room in which the user has `joined` membership.
|
description: The ID of each room in which the user has `joined` membership.
|
||||||
items:
|
items:
|
||||||
type: string
|
type: string
|
||||||
|
format: mx-room-id
|
||||||
|
pattern: "^!"
|
||||||
examples:
|
examples:
|
||||||
response:
|
response:
|
||||||
value: {
|
value: {
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,8 @@ paths:
|
||||||
example: "!curbf:matrix.org"
|
example: "!curbf:matrix.org"
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
|
format: mx-room-id
|
||||||
|
pattern: "^!"
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: The visibility of the room in the directory.
|
description: The visibility of the room in the directory.
|
||||||
|
|
@ -84,6 +86,8 @@ paths:
|
||||||
example: "!curbf:matrix.org"
|
example: "!curbf:matrix.org"
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
|
format: mx-room-id
|
||||||
|
pattern: "^!"
|
||||||
requestBody:
|
requestBody:
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
|
|
@ -158,6 +162,7 @@ paths:
|
||||||
to the local server. Case sensitive.
|
to the local server. Case sensitive.
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
|
format: mx-server-name
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: A list of the published rooms on the server.
|
description: A list of the published rooms on the server.
|
||||||
|
|
@ -186,6 +191,7 @@ paths:
|
||||||
to the local server. Case sensitive.
|
to the local server. Case sensitive.
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
|
format: mx-server-name
|
||||||
requestBody:
|
requestBody:
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue