-
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
Merged
Merged
GET media/config #1189
Changes from 15 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
2783820
Initial draft of GET media/limits
Half-Shot c9abf36
size > upload_size
Half-Shot de6fe1b
Add note about auth
Half-Shot ffc8ee2
a upload > an upload
Half-Shot 077cd04
/limits => /config
Half-Shot 6b9640b
upload_size => m.upload.size
Half-Shot 6d0a56d
Suggestions by Travis tend to be sensible ones
Half-Shot ddc1523
Extending words and rate limiting
Half-Shot 80935ea
Update content-repo.yaml
Half-Shot eeaf438
Speling is my weakniss
Half-Shot 091b2a6
Hard limit on requiring accessToken. Rephrased some sections
Half-Shot 1820df0
media => content repository
Half-Shot 21e957e
Better note for /config
Half-Shot 41c18be
+repository
Half-Shot a1309d6
Remove "Clients should handle gracefully" sentence
Half-Shot d5ce87e
Split summary up into description and summary
Half-Shot 2e6cc80
Better indent of description
Half-Shot 77f4ac5
Wordy intro sentence for description
Half-Shot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -269,3 +269,41 @@ paths: | |
"$ref": "definitions/error.yaml" | ||
tags: | ||
- Media | ||
"/config": | ||
get: | ||
summary: Get the configuration for the content repository. | ||
Clients SHOULD use this as a guide when using content repository endpoints. | ||
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 |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.