Skip to content

Commit

Permalink
Define a 400 response from {PUT,GET,DELETE} `/directory/rooms/{roomAl…
Browse files Browse the repository at this point in the history
…ias}` (#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>
  • Loading branch information
David Robertson and turt2live authored Oct 17, 2022
1 parent 11cef54 commit ad99be4
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 3 deletions.
1 change: 1 addition & 0 deletions changelogs/client_server/newsfragments/1286.clarification
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Define a 400 response from `/_matrix/client/v3/directory/rooms/{roomAlias}`.
39 changes: 36 additions & 3 deletions data/api/client-server/directory.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ paths:
- in: path
type: string
name: roomAlias
description: The room alias to set.
description: |
The room alias to set. Its format is defined
[in the appendices](/appendices/#room-aliases).
required: true
x-example: "#monkeys:matrix.org"
- in: body
Expand All @@ -61,6 +63,15 @@ paths:
application/json: {}
schema:
type: object
400:
description: The given `roomAlias` is not a valid room alias.
examples:
application/json: {
"errcode": "M_INVALID_PARAM",
"error": "Room alias invalid"
}
schema:
"$ref": "definitions/errors/error.yaml"
409:
description: A room alias with that name already exists.
examples:
Expand All @@ -86,7 +97,9 @@ paths:
- in: path
type: string
name: roomAlias
description: The room alias.
description: |
The room alias. Its format is defined
[in the appendices](/appendices/#room-aliases).
required: true
x-example: "#monkeys:matrix.org"
responses:
Expand All @@ -113,6 +126,15 @@ paths:
"another.com"
]
}
400:
description: The given `roomAlias` is not a valid room alias.
examples:
application/json: {
"errcode": "M_INVALID_PARAM",
"error": "Room alias invalid"
}
schema:
"$ref": "definitions/errors/error.yaml"
404:
description: There is no mapped room ID for this room alias.
examples:
Expand Down Expand Up @@ -146,7 +168,9 @@ paths:
- in: path
type: string
name: roomAlias
description: The room alias to remove.
description: |
The room alias to remove. Its format is defined
[in the appendices](/appendices/#room-aliases).
required: true
x-example: "#monkeys:matrix.org"
responses:
Expand Down Expand Up @@ -220,6 +244,15 @@ paths:
items:
type: string
required: ['aliases']
400:
description: The given `roomAlias` is not a valid room alias.
examples:
application/json: {
"errcode": "M_INVALID_PARAM",
"error": "Room alias invalid"
}
schema:
"$ref": "definitions/errors/error.yaml"
403:
description: The user is not permitted to retrieve the list of local aliases for the room.
examples:
Expand Down

0 comments on commit ad99be4

Please sign in to comment.