From 580298895b838e9a9aa6b02c1ff4e8e07870e2bf Mon Sep 17 00:00:00 2001 From: Olivier 'reivilibre Date: Tue, 24 Feb 2026 14:41:27 +0000 Subject: [PATCH] Add 404 responses to the OpenAPI of login endpoints (#2316) Signed-off-by: Olivier 'reivilibre --- .../newsfragments/2316.clarification | 1 + data/api/client-server/login.yaml | 15 +++++++++++++++ data/api/client-server/oauth_server_metadata.yaml | 15 +++++++++++++++ 3 files changed, 31 insertions(+) create mode 100644 changelogs/client_server/newsfragments/2316.clarification diff --git a/changelogs/client_server/newsfragments/2316.clarification b/changelogs/client_server/newsfragments/2316.clarification new file mode 100644 index 00000000..4b71e37a --- /dev/null +++ b/changelogs/client_server/newsfragments/2316.clarification @@ -0,0 +1 @@ +Add 404 responses to the OpenAPI of `GET /login` and `GET /auth_metadata` endpoints. The responses were already defined in text but not written in OpenAPI. diff --git a/data/api/client-server/login.yaml b/data/api/client-server/login.yaml index 7251d4ff..00827ce6 100644 --- a/data/api/client-server/login.yaml +++ b/data/api/client-server/login.yaml @@ -70,6 +70,21 @@ paths: } ] } + "404": + description: |- + With `M_UNRECOGNIZED`: the homeserver does not support the legacy authentication API. + (See [Authentication API discovery](/client-server-api/#authentication-api-discovery).) + content: + application/json: + schema: + $ref: definitions/errors/error.yaml + examples: + response: + value: + { + "errcode": "M_UNRECOGNIZED", + "error": "OAuth 2.0 authentication is in use on this homeserver.", + } "429": description: This request was rate-limited. content: diff --git a/data/api/client-server/oauth_server_metadata.yaml b/data/api/client-server/oauth_server_metadata.yaml index 719a1e16..e5533271 100644 --- a/data/api/client-server/oauth_server_metadata.yaml +++ b/data/api/client-server/oauth_server_metadata.yaml @@ -195,6 +195,21 @@ paths: "org.matrix.cross_signing_reset", ], } + "404": + description: |- + With `M_UNRECOGNIZED`: the homeserver does not support the OAuth 2.0 API. + (See [Authentication API discovery](/client-server-api/#authentication-api-discovery).) + content: + application/json: + schema: + $ref: definitions/errors/error.yaml + examples: + response: + value: + { + "errcode": "M_UNRECOGNIZED", + "error": "Legacy authentication is in use on this homeserver.", + } tags: - Session management servers: