mirror of
https://github.com/element-hq/synapse
synced 2024-09-12 03:35:10 +00:00
perl -pi -e 's#/matrix#/_matrix#g' ./cmdclient/console.py ./docs/client-server/howto.rst ./docs/client-server/specification.rst ./docs/client-server/swagger_matrix/directory ./docs/client-server/swagger_matrix/events ./docs/client-server/swagger_matrix/login ./docs/client-server/swagger_matrix/presence ./docs/client-server/swagger_matrix/profile ./docs/client-server/swagger_matrix/registration ./docs/client-server/swagger_matrix/rooms ./docs/server-server/specification.rst ./graph/graph.py ./jsfiddles/create_room_send_msg/demo.js ./jsfiddles/event_stream/demo.js ./jsfiddles/example_app/demo.js ./jsfiddles/register_login/demo.js ./jsfiddles/room_memberships/demo.js ./synapse/api/urls.py ./tests/federation/test_federation.py ./tests/handlers/test_presence.py ./tests/handlers/test_typing.py ./tests/rest/test_events.py ./tests/rest/test_presence.py ./tests/rest/test_profile.py ./tests/rest/test_rooms.py ./webclient/components/fileUpload/file-upload-service.js ./webclient/components/matrix/matrix-service.js
83 lines
2.1 KiB
Text
83 lines
2.1 KiB
Text
{
|
|
"apiVersion": "1.0.0",
|
|
"swaggerVersion": "1.2",
|
|
"basePath": "http://localhost:8080/_matrix/client/api/v1",
|
|
"resourcePath": "/directory",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"apis": [
|
|
{
|
|
"path": "/directory/room/{roomAlias}",
|
|
"operations": [
|
|
{
|
|
"method": "GET",
|
|
"summary": "Get the room ID corresponding to this room alias.",
|
|
"type": "DirectoryResponse",
|
|
"nickname": "get_room_id_for_alias",
|
|
"parameters": [
|
|
{
|
|
"name": "roomAlias",
|
|
"description": "The room alias.",
|
|
"required": true,
|
|
"type": "string",
|
|
"paramType": "path"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"method": "PUT",
|
|
"summary": "Create a new mapping from room alias to room ID.",
|
|
"type": "void",
|
|
"nickname": "add_room_alias",
|
|
"parameters": [
|
|
{
|
|
"name": "roomAlias",
|
|
"description": "The room alias to set.",
|
|
"required": true,
|
|
"type": "string",
|
|
"paramType": "path"
|
|
},
|
|
{
|
|
"name": "body",
|
|
"description": "The room ID to set.",
|
|
"required": true,
|
|
"type": "RoomAliasRequest",
|
|
"paramType": "body"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"models": {
|
|
"DirectoryResponse": {
|
|
"id": "DirectoryResponse",
|
|
"properties": {
|
|
"room_id": {
|
|
"type": "string",
|
|
"description": "The fully-qualified room ID.",
|
|
"required": true
|
|
},
|
|
"servers": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "string"
|
|
},
|
|
"description": "A list of servers that know about this room.",
|
|
"required": true
|
|
}
|
|
}
|
|
},
|
|
"RoomAliasRequest": {
|
|
"id": "RoomAliasRequest",
|
|
"properties": {
|
|
"room_id": {
|
|
"type": "string",
|
|
"description": "The room ID to map the alias to.",
|
|
"required": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|