You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
136 lines
5.1 KiB
YAML
136 lines
5.1 KiB
YAML
# will work with Mathoid on any {domain}
|
|
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: Welcome to your RESTBase API.
|
|
#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
|
|
x-route-filters:
|
|
- path: ./lib/normalize_title_filter.js
|
|
options:
|
|
redirect_cache_control: '{{options.purged_cache_control}}'
|
|
paths:
|
|
/media:
|
|
x-modules:
|
|
- path: v1/mathoid.yaml
|
|
options: '{{options.mathoid}}'
|
|
#/testing:
|
|
# x-modules:
|
|
# - path: ../mathpipe.yaml
|
|
# options: '{{options.mathoid}}'
|
|
/page:
|
|
x-modules:
|
|
- path: v1/content.yaml
|
|
options:
|
|
purged_cache_control: '{{options.purged_cache_control}}'
|
|
- path: v1/common_schemas.yaml # Doesn't really matter where to mount it.
|
|
- path: v1/mobileapps.js
|
|
# NOTE: We're setting the `no-store` cache-control header so that we don't
|
|
# store MCS results - we don't have pre-generation for wikivoyage.
|
|
options: '{{merge({"response_cache_control": options.purged_cache_control},
|
|
options.mobileapps)}}'
|
|
- path: v1/pcs/stored_endpoint.js
|
|
options:
|
|
name: media-list
|
|
response_cache_control: '{{options.purged_cache_control}}'
|
|
host: '{{options.mobileapps.host}}'
|
|
- path: v1/pcs/stored_endpoint.js
|
|
options:
|
|
name: mobile-html
|
|
response_cache_control: '{{options.purged_cache_control}}'
|
|
host: '{{options.mobileapps.host}}'
|
|
- path: v1/pcs/mobile-html-offline-resources.yaml
|
|
options:
|
|
host: '{{options.mobileapps.host}}'
|
|
- path: v1/talk.yaml
|
|
options:
|
|
host: '{{options.mobileapps.host}}'
|
|
/transform:
|
|
x-modules:
|
|
- path: v1/transform.yaml
|
|
- path: v1/pcs/transform.js
|
|
options:
|
|
mobileapps_host: '{{options.mobileapps.host}}'
|
|
cx_host: '{{options.cxserver.host}}'
|
|
/data:
|
|
x-modules:
|
|
- path: v1/citoid.js
|
|
options: '{{options.citoid}}'
|
|
- path: v1/lists.js
|
|
options: '{{options.lists}}'
|
|
- path: v1/css.yaml
|
|
options:
|
|
host: '{{options.mobileapps.host}}'
|
|
- path: v1/javascript.yaml
|
|
options:
|
|
host: '{{options.mobileapps.host}}'
|
|
- path: v1/i18n.yaml
|
|
options:
|
|
host: '{{options.mobileapps.host}}'
|
|
/key_value:
|
|
x-modules:
|
|
- path: sys/backend_proxy.js
|
|
options: '{{options.proxy}}'
|
|
/page_revisions:
|
|
x-modules:
|
|
- path: sys/backend_proxy.js
|
|
options: '{{options.proxy}}'
|
|
options: '{{options}}'
|
|
|
|
/{api:sys}:
|
|
x-modules:
|
|
- spec:
|
|
paths:
|
|
/mathoid:
|
|
x-modules:
|
|
- path: sys/mathoid.js
|
|
options: '{{options.mathoid}}'
|
|
/table:
|
|
x-modules:
|
|
- name: restbase-mod-table-isekai-mysql
|
|
version: 1.0.0
|
|
type: npm
|
|
options:
|
|
conf: '{{options.table}}'
|
|
/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: '{{options.events}}'
|
|
/page_revisions:
|
|
x-modules:
|
|
- path: sys/page_revisions.js
|
|
/action:
|
|
x-modules:
|
|
- path: sys/action.js
|
|
options: '{{options.action}}'
|
|
/page_save:
|
|
x-modules:
|
|
- path: sys/page_save.js
|
|
/parsoid:
|
|
x-modules:
|
|
- path: sys/parsoid.js
|
|
options:
|
|
parsoidHost: '{{options.parsoid.host}}'
|
|
response_cache_control: '{{options.purged_cache_control}}'
|
|
options: '{{options}}'
|