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/1606/head
Kitsune Ral 6 years ago committed by Travis Ralston
parent a6d42bf140
commit 9bc1470305

@ -60,13 +60,23 @@ paths:
type: object
properties:
tags:
title: Tags
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:
application/json: {
"tags": {
"m.favourite": {},
"u.Work": {"order": "1"},
"m.favourite": {"order": 0.1},
"u.Work": {"order": 0.7},
"u.Customers": {}
}
}
@ -110,8 +120,17 @@ paths:
Extra data for the tag, e.g. ordering.
schema:
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: {
"order": "1"}
"order": 0.25
}
responses:
200:
description:

@ -18,7 +18,15 @@
"description": "The tags on the room and their contents.",
"additionalProperties": {
"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