mirror of
https://github.com/matrix-org/matrix-spec
synced 2026-01-10 18:03:41 +01:00
Add profile API examples and extract examples for template usage.
This commit is contained in:
parent
fe7ffafc15
commit
5795e1ceda
|
|
@ -42,6 +42,9 @@ paths:
|
|||
responses:
|
||||
200:
|
||||
description: The display name was set.
|
||||
examples:
|
||||
application/json: |-
|
||||
{}
|
||||
schema:
|
||||
type: object # empty json object
|
||||
429:
|
||||
|
|
@ -59,6 +62,11 @@ paths:
|
|||
responses:
|
||||
200:
|
||||
description: The display name for this user.
|
||||
examples:
|
||||
application/json: |-
|
||||
{
|
||||
"displayname": "Alice Margatroid"
|
||||
}
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
|
|
@ -91,6 +99,9 @@ paths:
|
|||
responses:
|
||||
200:
|
||||
description: The avatar URL was set.
|
||||
examples:
|
||||
application/json: |-
|
||||
{}
|
||||
schema:
|
||||
type: object # empty json object
|
||||
429:
|
||||
|
|
@ -108,6 +119,11 @@ paths:
|
|||
responses:
|
||||
200:
|
||||
description: The avatar URL for this user.
|
||||
examples:
|
||||
application/json: |-
|
||||
{
|
||||
"avatar_url": "mxc://matrix.org/SDGdghriugerRg"
|
||||
}
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
|
|
|
|||
|
|
@ -184,7 +184,10 @@ class MatrixUnits(Units):
|
|||
"code": 200,
|
||||
"http": "200 OK",
|
||||
"desc": res200["description"],
|
||||
"params": res200params
|
||||
"params": res200params,
|
||||
"example": res200.get("examples", {}).get(
|
||||
"application/json", ""
|
||||
)
|
||||
}
|
||||
endpoint["responses"].append(ok_res)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue