-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change-Id: Ice3f1ee70a8fbe358835d60b8b3d20b59e063ec7
- Loading branch information
Showing
17 changed files
with
1,194 additions
and
180 deletions.
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
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
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
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 |
---|---|---|
|
@@ -76,7 +76,7 @@ services: | |
|
||
logging: | ||
name: restbase | ||
level: error | ||
level: warn | ||
streams: | ||
- type: stdout | ||
|
||
|
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,105 @@ | ||
paths: | ||
/{api:v1}: | ||
x-modules: | ||
# swagger options, overriding the shared ones from the merged specs (?) | ||
- spec: | ||
info: | ||
version: 1.0.0 | ||
title: Wikimedia REST API | ||
description: > | ||
This API provides cacheable and straightforward access to | ||
Wikimedia content and data, in machine-readable formats. | ||
### Global Rules | ||
- Limit your clients to no more than 200 requests/s to this API. | ||
Each API endpoint's documentation may detail more specific usage limits. | ||
- Set a unique `User-Agent` or `Api-User-Agent` header that | ||
allows us to contact you quickly. Email addresses or URLs | ||
of contact pages work well. | ||
By using this API, you agree to Wikimedia's | ||
[Terms of Use](https://wikimediafoundation.org/wiki/Terms_of_Use) and | ||
[Privacy Policy](https://wikimediafoundation.org/wiki/Privacy_policy). | ||
Unless otherwise specified in the endpoint documentation | ||
below, content accessed via this API is licensed under the | ||
[CC-BY-SA 3.0](https://creativecommons.org/licenses/by-sa/3.0/) | ||
and [GFDL](https://www.gnu.org/copyleft/fdl.html) licenses, | ||
and you irrevocably agree to release modifications or | ||
additions made through this API under these licenses. | ||
See https://www.mediawiki.org/wiki/REST_API for background and details. | ||
### Endpoint documentation | ||
Please consult each endpoint's documentation for details on: | ||
- Licensing information for the specific type of content | ||
and data served via the endpoint. | ||
- Stability markers to inform you about development status and | ||
change policy, according to | ||
[our API version policy](https://www.mediawiki.org/wiki/API_versioning). | ||
- Endpoint specific usage limits. | ||
termsOfService: https://wikimediafoundation.org/wiki/Terms_of_Use | ||
contact: | ||
name: the Wikimedia Services team | ||
url: http://mediawiki.org/wiki/REST_API | ||
license: | ||
name: Software available under the Apache 2 license | ||
url: http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
securityDefinitions: &wp/content-security/1.0.0 | ||
mediawiki_auth: | ||
description: Checks permissions using MW api | ||
type: apiKey | ||
in: header | ||
name: cookie | ||
x-internal-request-whitelist: | ||
- /http:\/\/[a-zA-Z0-9\.]+\/w\/api\.php/ | ||
# Override the base path for host-based (proxied) requests. In our case, | ||
# we proxy https://{domain}/api/rest_v1/ to the API. | ||
x-host-basePath: /api/rest_v1 | ||
paths: | ||
/media: | ||
x-modules: | ||
- path: v1/mathoid.yaml | ||
options: '{{options.mathoid}}' | ||
- path: v1/common_schemas.yaml # Doesn't really matter where to mount it. | ||
/metrics: | ||
x-modules: | ||
- path: v1/metrics.yaml | ||
options: '{{options.pageviews}}' | ||
/transform: | ||
x-modules: | ||
- path: v1/transform-global.yaml | ||
options: '{{options.transform}}' | ||
/feed: | ||
x-modules: | ||
- path: v1/availability.yaml | ||
options: '{{options.mobileapps}}' | ||
options: '{{options}}' | ||
|
||
/{api:sys}: | ||
x-modules: | ||
- spec: | ||
paths: | ||
/mathoid: | ||
x-modules: | ||
- path: sys/mathoid.js | ||
options: '{{options.mathoid}}' | ||
/table: &sys_table | ||
x-modules: | ||
- path: sys/table.js | ||
options: | ||
conf: '{{options.table}}' | ||
/key_value: &sys_key_value | ||
x-modules: | ||
- path: sys/key_value.js | ||
/post_data: &sys_post_data | ||
x-modules: | ||
- path: sys/post_data.js | ||
/events: | ||
x-modules: | ||
- path: sys/events.js | ||
options: '{{merge({"skip_updates": options.skip_updates}, options.events)}}' | ||
options: '{{options}}' |
Oops, something went wrong.