mirror of
https://github.com/matrix-org/matrix-spec
synced 2026-05-16 15:00:42 +02:00
Improve "Typing Notifications" section of the CS API (#2375)
* Convert m.typing JSON schema to YAML For consistency with other schemas. Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr> * Clarify string formats in Typing Notifications section of the CS API Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr> * Add changelog Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr> --------- Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
This commit is contained in:
parent
ba960f8d32
commit
1449321ea1
|
|
@ -0,0 +1 @@
|
||||||
|
Clarify formats of string types.
|
||||||
|
|
@ -36,6 +36,8 @@ paths:
|
||||||
example: "@alice:example.com"
|
example: "@alice:example.com"
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
|
format: mx-user-id
|
||||||
|
pattern: "^@"
|
||||||
- in: path
|
- in: path
|
||||||
name: roomId
|
name: roomId
|
||||||
description: The room in which the user is typing.
|
description: The room in which the user is typing.
|
||||||
|
|
@ -43,6 +45,8 @@ paths:
|
||||||
example: "!wefh3sfukhs:example.com"
|
example: "!wefh3sfukhs:example.com"
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
|
format: mx-room-id
|
||||||
|
pattern: "^!"
|
||||||
requestBody:
|
requestBody:
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
|
|
|
||||||
|
|
@ -1,29 +1,27 @@
|
||||||
{
|
$schema: https://json-schema.org/draft/2020-12/schema
|
||||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
||||||
"type": "object",
|
type: object
|
||||||
"title": "Typing Event",
|
title: Typing Event
|
||||||
"description": "Informs the client of the list of users currently typing.",
|
description: Informs the client of the list of users currently typing.
|
||||||
"allOf": [{
|
allOf:
|
||||||
"$ref": "core-event-schema/event.yaml"
|
- $ref: core-event-schema/event.yaml
|
||||||
}],
|
properties:
|
||||||
"properties": {
|
content:
|
||||||
"content": {
|
type: object
|
||||||
"type": "object",
|
properties:
|
||||||
"properties": {
|
user_ids:
|
||||||
"user_ids": {
|
type: array
|
||||||
"type": "array",
|
items:
|
||||||
"items": {
|
type: string
|
||||||
"type": "string"
|
format: mx-user-id
|
||||||
},
|
pattern: "^@"
|
||||||
"description": "The list of user IDs typing in this room, if any."
|
description: The list of user IDs typing in this room, if any.
|
||||||
}
|
required:
|
||||||
},
|
- user_ids
|
||||||
"required": ["user_ids"]
|
type:
|
||||||
},
|
type: string
|
||||||
"type": {
|
enum:
|
||||||
"type": "string",
|
- m.typing
|
||||||
"enum": ["m.typing"]
|
required:
|
||||||
}
|
- type
|
||||||
},
|
- content
|
||||||
"required": ["type", "content"]
|
|
||||||
}
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue