diff --git a/changelogs/client_server/newsfragments/2212.clarification b/changelogs/client_server/newsfragments/2212.clarification new file mode 100644 index 000000000..0b033b2bd --- /dev/null +++ b/changelogs/client_server/newsfragments/2212.clarification @@ -0,0 +1 @@ +Add example to each endpoint when the capability is not available. diff --git a/data/api/client-server/administrative_contact.yaml b/data/api/client-server/administrative_contact.yaml index 54b91d42d..bebbbcb8e 100644 --- a/data/api/client-server/administrative_contact.yaml +++ b/data/api/client-server/administrative_contact.yaml @@ -176,6 +176,18 @@ paths: value: { "submit_url": "https://example.org/path/to/submitToken" } + "400": + description: The 3PID changes capability is not available. + content: + application/json: + schema: + $ref: definitions/errors/error.yaml + examples: + response: + value: { + "errcode": "M_FORBIDDEN", + "error": "3PID changes are disabled on this server." + } "403": description: The credentials could not be verified with the identity server. content: @@ -244,6 +256,18 @@ paths: examples: response: value: {} + "400": + description: The 3PID changes capability is not available. + content: + application/json: + schema: + $ref: definitions/errors/error.yaml + examples: + response: + value: { + "errcode": "M_FORBIDDEN", + "error": "3PID changes are disabled on this server." + } "401": description: The homeserver requires additional authentication information. content: @@ -389,6 +413,18 @@ paths: example: success required: - id_server_unbind_result + "400": + description: The 3PID changes capability is not available. + content: + application/json: + schema: + $ref: definitions/errors/error.yaml + examples: + response: + value: { + "errcode": "M_FORBIDDEN", + "error": "3PID changes are disabled on this server." + } tags: - Account management /account/3pid/unbind: diff --git a/data/api/client-server/login_token.yaml b/data/api/client-server/login_token.yaml index f14e1a0af..b9c0b35d7 100644 --- a/data/api/client-server/login_token.yaml +++ b/data/api/client-server/login_token.yaml @@ -110,6 +110,18 @@ paths: application/json: schema: $ref: definitions/auth_response.yaml + "404": + description: The get login token capability is not available. + content: + application/json: + schema: + $ref: definitions/errors/error.yaml + examples: + response: + value: { + "errcode": "M_UNRECOGNIZED", + "error": "The get login token capability is not available." + } "429": description: This request was rate-limited. content: diff --git a/data/api/client-server/password_management.yaml b/data/api/client-server/password_management.yaml index bf310ff94..52c81a5e5 100644 --- a/data/api/client-server/password_management.yaml +++ b/data/api/client-server/password_management.yaml @@ -82,6 +82,18 @@ paths: application/json: schema: $ref: definitions/auth_response.yaml + "403": + description: The password change capability is not available. + content: + application/json: + schema: + $ref: definitions/errors/error.yaml + examples: + response: + value: { + "errcode": "M_FORBIDDEN", + "error": "Password change is disabled." + } "429": description: This request was rate-limited. content: diff --git a/data/api/client-server/profile.yaml b/data/api/client-server/profile.yaml index 9f872fe8f..fef6b7028 100644 --- a/data/api/client-server/profile.yaml +++ b/data/api/client-server/profile.yaml @@ -116,6 +116,12 @@ paths: "errcode": "M_INVALID_PARAM", "error": "Invalid profile key.", } + capability_disabled: + value: + { + "errcode": "M_FORBIDDEN", + "error": "Profile modification is disabled on this homeserver.", + } "403": description: The server is unwilling to perform the operation, either due to insufficient permissions or because profile modifications