-
-
Notifications
You must be signed in to change notification settings - Fork 97
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
Define a 400 response from {PUT,GET,DELETE} /directory/rooms/{roomAlias}
#1286
Conversation
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.
otherwise lgtm
@@ -61,6 +61,15 @@ paths: | |||
application/json: {} | |||
schema: | |||
type: object | |||
400: | |||
description: The given `roomAlias` is not a valid room alias. |
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.
"Define valid". We can probably copy a lot of the text from #1261 and use it here.
Generally though, I'm more in favour of fixing the spec to say that 400 M_INVALID_PARAM
is something which can appear on every endpoint rather than each endpoint individually. This is likely a larger effort than this PR should take on, however.
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.
I would ideally link to https://spec.matrix.org/latest/appendices/#room-aliases here, but I couldn't find an example of such a hyperlink from the OpenAPI spec.
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.
There is
(see also: https://spec.matrix.org/v1.2/appendices/#signing-json) |
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.
Oh, directly above this:
by the [key algorithm](/client-server-api/#key-algorithms). |
That'll do.
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.
There is
(see also: https://spec.matrix.org/v1.2/appendices/#signing-json) but this a) is hardcoded to a spec version and b) doesn't appear in the spec (#1287)
This looks like a bug, ftr. Will take a look.
Co-authored-by: Travis Ralston <travpc@gmail.com>
I have snuck-in a recommendation that clients URL-encode the hash character: |
I don't think that's a thing that should be snuck in here - it sounds like "do http correctly" which is out of scope for our spec. |
Fair enough; that's reverted. |
(please don't force push after review is given - it makes things harder on everyone) |
…ias}` (matrix-org#1286) * Define a 400 response from {PUT,GET,DELETE} `/directory/rooms/{roomAlias}` * Changelog * Adjust changelog Co-authored-by: Travis Ralston <travpc@gmail.com> * Refer to appendices Co-authored-by: Travis Ralston <travpc@gmail.com>
…#3297) Part of #3223 (matrix-org/matrix-spec#1286) (For `DELETE` we don't validate the alias, but just return a 404 if we can't find it)
Noticed when comparing Synapse against the spec in matrix-org/synapse#14176.
Not important, maybe a nice-to-have?
Preview: https://pr1286--matrix-spec-previews.netlify.app