From 295b94ad37da08be8ebc32989227ac863539f455 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Commaille?= Date: Sat, 22 Feb 2025 19:54:10 +0100 Subject: [PATCH] Clarify string formats and base64 encoding of /store-invite endpoint MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Kévin Commaille --- data/api/identity/v2_store_invite.yaml | 14 ++++++++++++-- data/string-formats.yaml | 5 +++++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/data/api/identity/v2_store_invite.yaml b/data/api/identity/v2_store_invite.yaml index 5dcd9a78..98e7e7f4 100644 --- a/data/api/identity/v2_store_invite.yaml +++ b/data/api/identity/v2_store_invite.yaml @@ -42,7 +42,7 @@ paths: (if present) from the request here. Also, the generated ephemeral public key will be listed as valid on - requests to `/_matrix/identity/v2/pubkey/ephemeral/isvalid`. + requests to [`/_matrix/identity/v2/pubkey/ephemeral/isvalid`](/identity-service-api/#get_matrixidentityv2pubkeyephemeralisvalid). Currently, invites may only be issued for 3pids of the `email` medium. @@ -70,10 +70,14 @@ paths: room_id: type: string description: The Matrix room ID to which the user is invited + format: mx-room-id + pattern: "^!" example: "!something:example.org" sender: type: string description: The Matrix user ID of the inviting user + format: mx-user-id + pattern: "^@" example: "@bob:example.com" room_alias: type: string @@ -81,12 +85,16 @@ paths: The Matrix room alias for the room to which the user is invited. This should be retrieved from the `m.room.canonical_alias` state event. + format: mx-room-alias + pattern: "^#" example: "#somewhere:example.org" room_avatar_url: type: string description: |- The Content URI for the room to which the user is invited. This should be retrieved from the `m.room.avatar` state event. + format: mx-mxc-uri + pattern: "^mxc:\\/\\/" example: mxc://example.org/s0meM3dia room_join_rules: type: string @@ -108,6 +116,8 @@ paths: type: string description: The Content URI for the avatar of the user ID initiating the invite. + format: mx-mxc-uri + pattern: "^mxc:\\/\\/" example: mxc://example.org/an0th3rM3dia room_type: type: string @@ -146,7 +156,7 @@ paths: public_key: type: string description: | - The public key, encoded using [unpadded Base64](/appendices/#unpadded-base64). + The public key, encoded using standard or URL-safe [unpadded Base64](/appendices/#unpadded-base64). key_validity_url: type: string description: | diff --git a/data/string-formats.yaml b/data/string-formats.yaml index 352d21fc..fca325b9 100644 --- a/data/string-formats.yaml +++ b/data/string-formats.yaml @@ -51,6 +51,11 @@ mx-room-id: url: appendices#room-ids # regex: "^!" +mx-room-alias: + title: Room Alias + url: appendices#room-aliases + # regex: "^#" + mx-server-name: title: Server Name url: appendices#server-name