Fix admin API user endpoint documentation examples to use JSON booleans (#19847)

I noticed that the documentation doesn't match reality.

The values from the database are cast to bools at:

- https://github.com/element-hq/synapse/blob/ff034c1f623bc769f1f3bca801592dd42697ea66/synapse/storage/databases/main/registration.py#L424-L439
- https://github.com/element-hq/synapse/blob/ff034c1f623bc769f1f3bca801592dd42697ea66/synapse/storage/databases/main/__init__.py#L330-L344
This commit is contained in:
Hugh Nimmo-Smith
2026-06-11 17:36:38 +01:00
committed by GitHub
parent ff034c1f62
commit bfaca98e57
2 changed files with 13 additions and 12 deletions
+12 -12
View File
@@ -34,11 +34,11 @@ It returns a JSON body like the following:
}
],
"avatar_url": "<avatar_url>", // can be null if not set
"is_guest": 0,
"admin": 0,
"deactivated": 0,
"is_guest": false,
"admin": false,
"deactivated": false,
"erased": false,
"shadow_banned": 0,
"shadow_banned": false,
"creation_ts": 1560432506,
"last_seen_ts": 1732919539393,
"appservice_id": null,
@@ -183,24 +183,24 @@ A response body like the following is returned:
"users": [
{
"name": "<user_id1>",
"is_guest": 0,
"admin": 0,
"is_guest": false,
"admin": false,
"user_type": null,
"deactivated": 0,
"deactivated": false,
"erased": false,
"shadow_banned": 0,
"shadow_banned": false,
"displayname": "<User One>",
"avatar_url": null,
"creation_ts": 1560432668000,
"locked": false
}, {
"name": "<user_id2>",
"is_guest": 0,
"admin": 1,
"is_guest": false,
"admin": true,
"user_type": null,
"deactivated": 0,
"deactivated": false,
"erased": false,
"shadow_banned": 0,
"shadow_banned": false,
"displayname": "<User Two>",
"avatar_url": "<avatar_url>",
"creation_ts": 1561550621000,