-
-
Notifications
You must be signed in to change notification settings - Fork 121
Add example to each endpoint when the capability is not available #2212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
e7abc7c
82e7b62
bf08e68
8cb0b3e
2a8a6d7
205fa06
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Add example to each endpoint when the capability is not available. |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -110,6 +110,18 @@ paths: | |
application/json: | ||
schema: | ||
$ref: definitions/auth_response.yaml | ||
"404": | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm re-reading MSC3882 now (which I happened to author). The suggested 404 here is based on Synapse implementation. An alternative would be:
|
||
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: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -82,6 +82,18 @@ paths: | |
application/json: | ||
schema: | ||
$ref: definitions/auth_response.yaml | ||
"403": | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This code came from approach described at https://github.com/matrix-org/matrix-spec/pull/2212/files#r2378179370 |
||
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: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -116,6 +116,12 @@ paths: | |
"errcode": "M_INVALID_PARAM", | ||
"error": "Invalid profile key.", | ||
} | ||
capability_disabled: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Again, this code was based on the Synapse implementation. |
||
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 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where do these status codes choices come from?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The original MSC3283 did not specify the expected response code and referred to the Synapse implementation. So, I took these values from the Synapse implementation.
Another approach to the clarification would be to specify a range. e.g. 400-499