Skip to content

Commit

Permalink
Merge 7f28f3a into 747cbd2
Browse files Browse the repository at this point in the history
  • Loading branch information
d00rman committed Oct 11, 2019
2 parents 747cbd2 + 7f28f3a commit c59d8ec
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 41 deletions.
5 changes: 2 additions & 3 deletions projects/v1/wikipedia.wmf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,13 @@ paths:
options:
response_cache_control: '{{options.purged_cache_control}}'
host: '{{options.mobileapps.host}}'
- path: v1/pcs/stored_endpoint.js
- path: v1/pcs/metadata.yaml
options:
name: media-list
response_cache_control: '{{options.purged_cache_control}}'
host: '{{options.mobileapps.host}}'
- path: v1/pcs/stored_endpoint.js
options:
name: metadata
name: media-list
response_cache_control: '{{options.purged_cache_control}}'
host: '{{options.mobileapps.host}}'
- path: v1/pcs/stored_endpoint.js
Expand Down
5 changes: 2 additions & 3 deletions projects/v1/wikivoyage.wmf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,13 @@ paths:
options:
response_cache_control: '{{options.purged_cache_control}}'
host: '{{options.mobileapps.host}}'
- path: v1/pcs/stored_endpoint.js
- path: v1/pcs/metadata.yaml
options:
name: media-list
response_cache_control: '{{options.purged_cache_control}}'
host: '{{options.mobileapps.host}}'
- path: v1/pcs/stored_endpoint.js
options:
name: metadata
name: media-list
response_cache_control: '{{options.purged_cache_control}}'
host: '{{options.mobileapps.host}}'
- path: v1/pcs/stored_endpoint.js
Expand Down
5 changes: 2 additions & 3 deletions projects/v1/wiktionary.wmf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,13 @@ paths:
options:
response_cache_control: '{{options.purged_cache_control}}'
host: '{{options.mobileapps.host}}'
- path: v1/pcs/stored_endpoint.js
- path: v1/pcs/metadata.yaml
options:
name: media-list
response_cache_control: '{{options.purged_cache_control}}'
host: '{{options.mobileapps.host}}'
- path: v1/pcs/stored_endpoint.js
options:
name: metadata
name: media-list
response_cache_control: '{{options.purged_cache_control}}'
host: '{{options.mobileapps.host}}'
- path: v1/pcs/stored_endpoint.js
Expand Down
57 changes: 25 additions & 32 deletions v1/pcs/metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,36 +81,19 @@ paths:
application/problem+json:
schema:
$ref: '#/components/schemas/problem'
operationId: getContent-metadata
x-monitor: true
x-amples:
- title: Get metadata from storage
request:
params:
domain: en.wikipedia.org
title: User:BSitzmann_(WMF)/MCS/Test/Frankenstein
response:
status: 200
headers:
etag: /.+/
content-type: /^application\/json/
body:
revision: /.+/
tid: /.+/
hatnotes:
- section: /.+/
html: /.+/
toc:
title: /.+/
entries:
- level: /.+/
section: /.+/
number: /.+/
anchor: /.+/
html: /.+/
protection:
edit: [ /.+/ ]
move: [ /.+/ ]
x-monitor: false
x-request-handler:
- get_from_pcs:
request:
method: get
headers:
cache-control: '{{cache-control}}'
accept-language: '{{accept-language}}'
uri: '{{options.host}}/{domain}/v1/page/metadata/{title}'
return:
status: 200
headers: '{{ merge({"cache-control": options.response_cache_control}, get_from_pcs.headers) }}'
body: '{{get_from_pcs.body}}'

/metadata/{title}/{revision}:
x-route-filters:
Expand Down Expand Up @@ -138,8 +121,18 @@ paths:
To get a 200 response instead, supply `false` to the `redirect` parameter.
schema:
type: boolean
operationId: getContentWithRevision-metadata
x-monitor: false
x-request-handler:
- get_from_pcs:
request:
method: get
headers:
cache-control: '{{cache-control}}'
accept-language: '{{accept-language}}'
uri: '{{options.host}}/{domain}/v1/page/metadata/{title}/{revision}'
return:
status: 200
headers: '{{ merge({"cache-control": options.response_cache_control}, get_from_pcs.headers) }}'
body: '{{get_from_pcs.body}}'

components:
schemas:
Expand Down

0 comments on commit c59d8ec

Please sign in to comment.