Elaborate the structure of m.tag events

...and corresponding structures in tag-related CS API calls

Signed-off-by: Alexey Rusakov <Alexey.Rusakov@pm.me>
pull/977/head
Kitsune Ral 6 years ago committed by Travis Ralston
parent a6d42bf140
commit 9bc1470305

@ -60,13 +60,23 @@ paths:
type: object type: object
properties: properties:
tags: tags:
title: Tags
type: object type: object
additionalProperties:
title: Tag
type: object
properties:
order:
type: number
format: float
description: |-
A number in a range ``[0,1]`` describing a relative
position of the room under the given tag.
additionalProperties: true
examples: examples:
application/json: { application/json: {
"tags": { "tags": {
"m.favourite": {}, "m.favourite": {"order": 0.1},
"u.Work": {"order": "1"}, "u.Work": {"order": 0.7},
"u.Customers": {} "u.Customers": {}
} }
} }
@ -110,8 +120,17 @@ paths:
Extra data for the tag, e.g. ordering. Extra data for the tag, e.g. ordering.
schema: schema:
type: object type: object
properties:
order:
type: number
format: float
description: |-
A number in a range ``[0,1]`` describing a relative
position of the room under the given tag.
additionalProperties: true
example: { example: {
"order": "1"} "order": 0.25
}
responses: responses:
200: 200:
description: description:

@ -18,7 +18,15 @@
"description": "The tags on the room and their contents.", "description": "The tags on the room and their contents.",
"additionalProperties": { "additionalProperties": {
"title": "Tag", "title": "Tag",
"type": "object" "type": "object",
"properties": {
"order": {
"type": "number",
"format": "float",
"description":
"A number in a range ``[0,1]`` describing a relative position of the room under the given tag."
}
}
} }
} }
} }

Loading…
Cancel
Save