mirror of
https://github.com/matrix-org/matrix-spec
synced 2026-01-23 15:53:43 +01:00
Merge branch 'master' into patch-1
This commit is contained in:
commit
e0cdfd8897
|
|
@ -100,6 +100,7 @@ paths:
|
||||||
name: allow_remote
|
name: allow_remote
|
||||||
x-example: false
|
x-example: false
|
||||||
required: false
|
required: false
|
||||||
|
default: true
|
||||||
description: |
|
description: |
|
||||||
Indicates to the server that it should not attempt to fetch the media if it is deemed
|
Indicates to the server that it should not attempt to fetch the media if it is deemed
|
||||||
remote. This is to prevent routing loops where the server contacts itself. Defaults to
|
remote. This is to prevent routing loops where the server contacts itself. Defaults to
|
||||||
|
|
@ -154,6 +155,7 @@ paths:
|
||||||
name: allow_remote
|
name: allow_remote
|
||||||
x-example: false
|
x-example: false
|
||||||
required: false
|
required: false
|
||||||
|
default: true
|
||||||
description: |
|
description: |
|
||||||
Indicates to the server that it should not attempt to fetch the media if it is deemed
|
Indicates to the server that it should not attempt to fetch the media if it is deemed
|
||||||
remote. This is to prevent routing loops where the server contacts itself. Defaults to
|
remote. This is to prevent routing loops where the server contacts itself. Defaults to
|
||||||
|
|
@ -221,6 +223,7 @@ paths:
|
||||||
name: allow_remote
|
name: allow_remote
|
||||||
x-example: false
|
x-example: false
|
||||||
required: false
|
required: false
|
||||||
|
default: true
|
||||||
description: |
|
description: |
|
||||||
Indicates to the server that it should not attempt to fetch the media if it is deemed
|
Indicates to the server that it should not attempt to fetch the media if it is deemed
|
||||||
remote. This is to prevent routing loops where the server contacts itself. Defaults to
|
remote. This is to prevent routing loops where the server contacts itself. Defaults to
|
||||||
|
|
|
||||||
|
|
@ -274,7 +274,7 @@ paths:
|
||||||
type: object
|
type: object
|
||||||
description: |-
|
description: |-
|
||||||
One-time keys for the queried devices. A map from user ID, to a
|
One-time keys for the queried devices. A map from user ID, to a
|
||||||
map from ``<algorithm>:<key_id>`` to the key object.
|
map from devices to a map from ``<algorithm>:<key_id>`` to the key object.
|
||||||
additionalProperties:
|
additionalProperties:
|
||||||
type: object
|
type: object
|
||||||
additionalProperties:
|
additionalProperties:
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,42 @@ securityDefinitions:
|
||||||
$ref: definitions/security.yaml
|
$ref: definitions/security.yaml
|
||||||
paths:
|
paths:
|
||||||
"/login":
|
"/login":
|
||||||
|
get:
|
||||||
|
summary: Get the supported login types to authenticate users
|
||||||
|
description: |-
|
||||||
|
Gets the homeserver's supported login types to authenticate users. Clients
|
||||||
|
should pick one of these and supply it as the ``type`` when logging in.
|
||||||
|
operationId: getLoginFlows
|
||||||
|
responses:
|
||||||
|
200:
|
||||||
|
description: The login types the homeserver supports
|
||||||
|
examples:
|
||||||
|
application/json: {
|
||||||
|
"flows": [
|
||||||
|
{"type": "m.login.password"}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
flows:
|
||||||
|
type: array
|
||||||
|
description: The homeserver's supported login types
|
||||||
|
items:
|
||||||
|
type: object
|
||||||
|
title: LoginFlow
|
||||||
|
properties:
|
||||||
|
type:
|
||||||
|
description: |-
|
||||||
|
The login type. This is supplied as the ``type`` when
|
||||||
|
logging in.
|
||||||
|
type: string
|
||||||
|
429:
|
||||||
|
description: This request was rate-limited.
|
||||||
|
schema:
|
||||||
|
"$ref": "definitions/error.yaml"
|
||||||
|
tags:
|
||||||
|
- Session management
|
||||||
post:
|
post:
|
||||||
summary: Authenticates the user.
|
summary: Authenticates the user.
|
||||||
description: |-
|
description: |-
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,8 @@ Unreleased changes
|
||||||
(`#1263 <https://github.com/matrix-org/matrix-doc/pull/1263>`_).
|
(`#1263 <https://github.com/matrix-org/matrix-doc/pull/1263>`_).
|
||||||
- Document `highlights` field in /search response
|
- Document `highlights` field in /search response
|
||||||
(`#1274 <https://github.com/matrix-org/matrix-doc/pull/1274>`_).
|
(`#1274 <https://github.com/matrix-org/matrix-doc/pull/1274>`_).
|
||||||
|
- Document the GET version of ``/login``
|
||||||
|
(`#1361 <https://github.com/matrix-org/matrix-doc/pull/1361>`_).
|
||||||
|
|
||||||
- Spec clarifications:
|
- Spec clarifications:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -98,6 +98,9 @@ func makeWalker(base string, w *fsnotify.Watcher) filepath.WalkFunc {
|
||||||
log.Fatalf("Failed to get relative path of %s: %v", path, err)
|
log.Fatalf("Failed to get relative path of %s: %v", path, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Normalize slashes
|
||||||
|
rel = filepath.ToSlash(rel)
|
||||||
|
|
||||||
// skip a few things that we know don't form part of the spec
|
// skip a few things that we know don't form part of the spec
|
||||||
if rel == "api/node_modules" ||
|
if rel == "api/node_modules" ||
|
||||||
rel == "scripts/gen" ||
|
rel == "scripts/gen" ||
|
||||||
|
|
@ -125,6 +128,14 @@ func filter(e fsnotify.Event) bool {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Forcefully ignore directories we don't care about (Windows, at least, tries to notify about some directories)
|
||||||
|
filePath := filepath.ToSlash(e.Name) // normalize slashes
|
||||||
|
if strings.Contains(filePath, "/scripts/tmp") ||
|
||||||
|
strings.Contains(filePath, "/scripts/gen") ||
|
||||||
|
strings.Contains(filePath, "/api/node_modules") {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -147,7 +158,7 @@ func serve(w http.ResponseWriter, req *http.Request) {
|
||||||
if file[0] == '/' {
|
if file[0] == '/' {
|
||||||
file = file[1:]
|
file = file[1:]
|
||||||
}
|
}
|
||||||
b, ok = m.bytes[file]
|
b, ok = m.bytes[filepath.FromSlash(file)] // de-normalize slashes
|
||||||
|
|
||||||
if ok && file == "api-docs.json" {
|
if ok && file == "api-docs.json" {
|
||||||
w.Header().Set("Access-Control-Allow-Origin", "*")
|
w.Header().Set("Access-Control-Allow-Origin", "*")
|
||||||
|
|
|
||||||
|
|
@ -8,8 +8,11 @@ cd `dirname $0`/..
|
||||||
|
|
||||||
mkdir -p assets
|
mkdir -p assets
|
||||||
|
|
||||||
# generate specification/proposals.rst
|
if [ "$TRAVIS" != "true" ]
|
||||||
./scripts/proposals.py
|
then
|
||||||
|
# generate specification/proposals.rst
|
||||||
|
./scripts/proposals.py
|
||||||
|
fi
|
||||||
|
|
||||||
# generate the spec docs
|
# generate the spec docs
|
||||||
./scripts/gendoc.py -d assets/spec
|
./scripts/gendoc.py -d assets/spec
|
||||||
|
|
|
||||||
|
|
@ -713,6 +713,8 @@ func main() {
|
||||||
"ara4n": true,
|
"ara4n": true,
|
||||||
"leonerd": true,
|
"leonerd": true,
|
||||||
"rxl881": true,
|
"rxl881": true,
|
||||||
|
"uhoreg": true,
|
||||||
|
"turt2live": true,
|
||||||
}
|
}
|
||||||
if err := initCache(); err != nil {
|
if err := initCache(); err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue