Skip to content

Commit d0d71d9

Browse files
authored
Clarify formats of string types in account sections (#2046)
Signed-off-by: Kévin Commaille <[email protected]>
1 parent ad17652 commit d0d71d9

File tree

6 files changed

+13
-1
lines changed

6 files changed

+13
-1
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Clarify formats of string types.

data/api/client-server/registration.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,8 @@ paths:
135135
properties:
136136
user_id:
137137
type: string
138+
format: mx-user-id
139+
pattern: "^@"
138140
description: |-
139141
The fully-qualified Matrix user ID (MXID) that has been registered.
140142
@@ -169,6 +171,7 @@ paths:
169171
x-addedInMatrixVersion: "1.3"
170172
home_server:
171173
type: string
174+
format: mx-server-name
172175
deprecated: true
173176
description: |-
174177
The server_name of the homeserver on which the account has

data/api/client-server/whoami.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ paths:
4444
properties:
4545
user_id:
4646
type: string
47+
format: mx-user-id
48+
pattern: "^@"
4749
description: The user ID that owns the access token.
4850
device_id:
4951
x-addedInMatrixVersion: "1.1"

data/api/identity/definitions/request_email_validation.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ properties:
2323
example: "monkeys_are_GREAT"
2424
email:
2525
type: string
26+
format: email
2627
description: The email address to validate.
2728
example: "[email protected]"
2829
send_attempt:
@@ -39,6 +40,7 @@ properties:
3940
example: 1
4041
next_link:
4142
type: string
43+
format: uri
4244
description: |-
4345
Optional. When the validation is completed, the identity server will
4446
redirect the user to this URL. This option is ignored when submitting

data/api/identity/definitions/request_msisdn_validation.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ properties:
4444
example: 1
4545
next_link:
4646
type: string
47+
format: uri
4748
description: |-
4849
Optional. When the validation is completed, the identity server will
4950
redirect the user to this URL. This option is ignored when submitting

data/event-schemas/schema/m.identity_server.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@ properties:
99
type: object
1010
properties:
1111
base_url:
12-
type: string
12+
anyOf:
13+
- type: string
14+
format: uri
15+
- type: "null"
1316
description: |-
1417
The URL of the identity server the user prefers to use, or `null`
1518
if the user does not want to use an identity server. This value is

0 commit comments

Comments
 (0)