From 2ea8e0f514cfeb8742f502b6bdf3320da01876ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Commaille?= <76261501+zecakeh@users.noreply.github.com> Date: Tue, 9 Apr 2024 18:27:26 +0200 Subject: [PATCH] Remove enum for `POST /login` `type` definition (#1776) Since the enum is not exhaustive, improve the description of the property instead. --- .../client_server/newsfragments/1776.clarification | 1 + data/api/client-server/login.yaml | 10 ++++++---- 2 files changed, 7 insertions(+), 4 deletions(-) create mode 100644 changelogs/client_server/newsfragments/1776.clarification diff --git a/changelogs/client_server/newsfragments/1776.clarification b/changelogs/client_server/newsfragments/1776.clarification new file mode 100644 index 00000000..4d2def20 --- /dev/null +++ b/changelogs/client_server/newsfragments/1776.clarification @@ -0,0 +1 @@ +Clarify that the `type` of the `POST /login` request must be one of the types returned by the `GET /login` response. diff --git a/data/api/client-server/login.yaml b/data/api/client-server/login.yaml index 6ae5d3a8..b37d1742 100644 --- a/data/api/client-server/login.yaml +++ b/data/api/client-server/login.yaml @@ -109,10 +109,12 @@ paths: properties: type: type: string - enum: - - m.login.password - - m.login.token - description: The login type being used. + description: |- + The login type being used. + + This must be a type returned in one of the flows of the + response of the [`GET /login`](/client-server-api/#get_matrixclientv3login) + endpoint, like `m.login.password` or `m.login.token`. identifier: $ref: definitions/user_identifier.yaml user: