-
Notifications
You must be signed in to change notification settings - Fork 384
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
GET media/config #1189
GET media/config #1189
Changes from 17 commits
2783820
c9abf36
de6fe1b
ffc8ee2
077cd04
6b9640b
6d0a56d
ddc1523
80935ea
eeaf438
091b2a6
1820df0
21e957e
41c18be
a1309d6
d5ce87e
2e6cc80
77f4ac5
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 |
---|---|---|
|
@@ -269,3 +269,42 @@ paths: | |
"$ref": "definitions/error.yaml" | ||
tags: | ||
- Media | ||
"/config": | ||
get: | ||
summary: Get the configuration for the content repository. | ||
description: |- | ||
Clients SHOULD use this as a guide when using content repository endpoints. | ||
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. generally we start with a wordy description of the endpoint here. "This endpoint allows clients to retrieve information about the media repository." 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. [which makes it read better in the spec doc] |
||
All values are intentionally left optional. Clients SHOULD follow | ||
the advice given in the field description when the field is not available. | ||
|
||
**NOTE:** Both clients and server administrators should be aware that proxies | ||
between the client and the server may affect the apparent behaviour of content | ||
repository APIs, for example, proxies may enforce a lower upload size limit | ||
than is advertised by the server on this endpoint. | ||
operationId: getConfig | ||
produces: ["application/json"] | ||
security: | ||
- accessToken: [] | ||
responses: | ||
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. a 429 should be added to indicate rate limiting:
|
||
200: | ||
description: The public content repository configuration for the matrix server. | ||
schema: | ||
type: object | ||
properties: | ||
m.upload.size: | ||
type: number | ||
description: |- | ||
The maximum size an upload can be in bytes. | ||
Clients SHOULD use this as a guide when uploading content. | ||
If not listed or null, the size limit should be treated as unknown. | ||
examples: | ||
application/json: { | ||
"m.upload.size": 50000000 | ||
} | ||
429: | ||
description: This request was rate-limited. | ||
schema: | ||
"$ref": "definitions/error.yaml" | ||
|
||
tags: | ||
- Media |
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.
this isn't a summary! It's messing up the formatting in the swagger UI (https://matrix.org/docs/api/client-server/?url=https%3A%2F%2Fmatrix.org%2Fspeculator%2Fspec%2F1189%2Fapi-docs.json#!/Media/getConfig) : please see the notes at https://github.com/matrix-org/matrix-doc/blob/master/meta/documentation_style.rst#openapi.
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 dear, yes. good catch.