Skip to content

Commit

Permalink
Merge 81f3143 into 74d4cce
Browse files Browse the repository at this point in the history
  • Loading branch information
clarakosi committed Apr 8, 2019
2 parents 74d4cce + 81f3143 commit 605d237
Show file tree
Hide file tree
Showing 7 changed files with 112 additions and 32 deletions.
6 changes: 4 additions & 2 deletions sys/key_rev_value.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ paths:
get:
operationId: listRevisions

/{bucket}/{key}{/revision}{/tid}:
/{bucket}/{key}/{revision}: &bucket_key_revision
get:
operationId: getRevision
/{bucket}/{key}/{revision}{/tid}:
put:
operationId: putRevision

/{bucket}/{key}/{revision}/{tid}:
<<: *bucket_key_revision
15 changes: 12 additions & 3 deletions sys/mobileapps.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,24 @@
info:
title: Mobileapps sys API module
paths:
/mobile-sections/{title}{/revision}:
/mobile-sections/{title}: &mobile-sections_title
get:
operationId: getSections

/mobile-sections-lead/{title}{/revision}:
/mobile-sections/{title}/{revision}:
<<: *mobile-sections_title

/mobile-sections-lead/{title}: &mobile-sections-lead_title
get:
operationId: getSectionsLead

/mobile-sections-remaining/{title}{/revision}:
/mobile-sections-lead/{title}/{revision}:
<<: *mobile-sections-lead_title

/mobile-sections-remaining/{title}: &mobile-sections-remaining_title
get:
operationId: getSectionsRemaining

/mobile-sections-remaining/{title}/{revision}:
<<: *mobile-sections-remaining_title

19 changes: 15 additions & 4 deletions sys/multi_content_bucket.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,23 @@ paths:
/:
put:
operationId: createBucket
/{content}/{key}: &content_key
get:
operationId: getRevision

/{content}/{key}/:
get:
operationId: listRevisions
/{content}/{key}{/revision}{/tid}:
get:
operationId: getRevision
/all/{key}/{revision}{/tid}:

/{content}/{key}/{revision}:
<<: *content_key

/{content}/{key}/{revision}/{tid}:
<<: *content_key

/all/{key}/{revision}: &all_key_revision
put:
operationId: putRevision

/all/{key}/{revision}/{tid}:
<<: *all_key_revision
12 changes: 7 additions & 5 deletions sys/page_revisions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ paths:
type: string
required: false

/page/{title}: &page_title
get:
summary: Get the revision metadata for a specific revision
operationId: getTitleRevision

/page/{title}/:
get:
summary: List revisions for a title (page history)
Expand All @@ -21,8 +26,5 @@ paths:
type: string
required: false

/page/{title}{/revision}:
get:
summary: Get the revision metadata for a specific revision
operationId: getTitleRevision

/page/{title}/{revision}:
<<: *page_title
83 changes: 67 additions & 16 deletions sys/parsoid.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,25 @@ info:
API through the `action` module.
paths:

/pagebundle/{title}{/revision}{/tid}:
/pagebundle/{title}: &pagebundle_title
get:
summary: Retrieve a JSON bundle containing html and data-parsoid
operationId: getPageBundle
post:
summary: Retrieve a JSON bundle containing html and data-parsoid
operationId: getPageBundle

/pagebundle/{title}/{revision}:
<<: *pagebundle_title

/pagebundle/{title}/{revision}/{tid}:
<<: *pagebundle_title

/wikitext/{title}: &wikitext_title
get:
summary: Retrieve the wikitext for a title and revision.
operationId: getWikitext

/wikitext/{title}/:
get:
summary: List Wikitext revisions.
Expand All @@ -26,10 +37,16 @@ paths:
type: string
required: false

/wikitext/{title}{/revision}{/tid}:
/wikitext/{title}/{revision}:
<<: *wikitext_title

/wikitext/{title}/{revision}/{tid}:
<<: *wikitext_title

/html/{title}: &html_title
get:
summary: Retrieve the wikitext for a title and revision.
operationId: getWikitext
summary: Retrieve the HTML for title and revision.
operationId: getHtml

/html/{title}/:
get:
Expand All @@ -42,10 +59,16 @@ paths:
type: string
required: false

/html/{title}{/revision}{/tid}:
/html/{title}/{revision}:
<<: *html_title

/html/{title}/{revision}/{tid}:
<<: *html_title

/data-parsoid/{title}: &data-parsoid_title
get:
summary: Retrieve the HTML for title and revision.
operationId: getHtml
summary: Retrieve the data-parsoid JSON for title & revision.
operationId: getDataParsoid

/data-parsoid/{title}/:
get:
Expand All @@ -58,36 +81,64 @@ paths:
type: string
required: false

/data-parsoid/{title}{/revision}{/tid}:
get:
summary: Retrieve the data-parsoid JSON for title & revision.
operationId: getDataParsoid
/data-parsoid/{title}/{revision}:
<<: *data-parsoid_title

/data-parsoid/{title}/{revision}/{tid}:
<<: *data-parsoid_title

/lint/{title}{/revision}:
/lint/{title}: &lint_title
get:
summary: Retreive the lint errors for a specific page revision
operationId: getLintErrors

/transform/html/to/html{/title}{/revision}:
/lint/{title}/{revision}:
<<: *lint_title

/transform/html/to/html: &transform_html_to_html
post:
summary: Update HTML, while optionally passing in title & revision.
operationId: transformHtmlToHtml

/transform/html/to/wikitext{/title}{/revision}:
/transform/html/to/html/{title}:
<<: *transform_html_to_html

/transform/html/to/html/{title}/{revision}:
<<: *transform_html_to_html

/transform/html/to/wikitext: &transform_html_to_wikitext
post:
summary: Transform HTML to wikitext.
operationId: transformHtmlToWikitext

/transform/wikitext/to/html{/title}{/revision}:
/transform/html/to/wikitext/{title}:
<<: *transform_html_to_wikitext

/transform/html/to/wikitext/{title}/{revision}:
<<: *transform_html_to_wikitext

/transform/wikitext/to/html: &transform_wikitext_to_html
post:
summary: Transform wikitext to HTML.
operationId: transformWikitextToHtml

/transform/wikitext/to/lint{/title}{/revision}:
/transform/wikitext/to/html/{title}:
<<: *transform_wikitext_to_html

/transform/wikitext/to/html/{title}/{revision}:
<<: *transform_wikitext_to_html

/transform/wikitext/to/lint: &transform_wikitext_to_lint
post:
summary: Check the wikitext for lint errors.
operationId: transformWikitextToLint

/transform/wikitext/to/lint/{title}:
<<: *transform_wikitext_to_lint

/transform/wikitext/to/lint/{title}/{revision}:
<<: *transform_wikitext_to_lint

/transform/changes/to/wikitext/{title}/{revision}:
post:
summary: Transform section changes to wikitext.
Expand Down
4 changes: 3 additions & 1 deletion sys/post_data.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ paths:
put:
operationId: putRevision

/{bucket}/{key}{/tid}:
/{bucket}/{key}: &bucket_key
get:
operationId: getRevision
/{bucket}/{key}/{tid}:
<<: *bucket_key

/{bucket}/hash:
post:
Expand Down
5 changes: 4 additions & 1 deletion test/test_module.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ paths:
title: Wikimedia testing APIs
x-is-api-root: true
paths:
/service/test/{title}{/revision}:
/service/test/{title}: &service_test_title
get:
x-setup-handler:
- init_storage:
Expand Down Expand Up @@ -46,6 +46,9 @@ paths:

x-monitor: false

/service/test/{title}/{revision}:
<<: *service_test_title

/service/test_parallel/{key1}/{key2}:
get:
x-request-handler:
Expand Down

0 comments on commit 605d237

Please sign in to comment.