Page MenuHomePhabricator

Add translatable OpenAPI endpoint descriptions for all remaining endpoints
Closed, ResolvedPublic3 Estimated Story Points

Description

Description

Endpoint descriptions are helpful for getting basic information about an endpoint's purpose. Including endpoint descriptions also creates a more complete and consistent experience with other modern APIs, as well as other SwaggerUI implementations from across the foundation.

Conditions of acceptance

Following the approach outlined in the related research spike, add translatable endpoint descriptions to all content endpoints:

  • GET /page/{title}/history
  • GET /page/{title}/history/counts/{type}
  • GET /revision/{from}/compare/{to}
  • GET /search
  • GET /search/page
  • GET /search/title
  • GET /page/{title}/links/language
  • GET /page/{title}/links/media
  • GET /file/{title}
  • POST /transform/wikitext/to/html/
  • POST /transform/html/to/wikitext/
  • POST /transform/wikitext/to/html/{title}
  • POST /transform/html/to/wikitext/{title}
  • POST /transform/wikitext/to/html/{title}/{revision}
  • POST /transform/html/to/wikitext/{title}/{revision}
  • For the endpoint descriptions themselves, use the descriptions currently available in the API Portal.
    • If there are endpoints that are missing descriptions in the portal, consult with Halley for generating a new description.
  • All descriptions are translatable by translatewiki.

Event Timeline

HCoplin-WMF set the point value for this task to 3.

Change #1149994 had a related patch set uploaded (by Atieno; author: Atieno):

[mediawiki/core@master] REST: Add translatable OpenAPI endpoint descriptions for all remaining endpoints

https://gerrit.wikimedia.org/r/1149994

Hi @HCoplin-WMF The non-checked boxes are missing descriptions

Missing endpoint descriptions:

  • GET /page/{title}/history
    • Description: Returns information about the latest revisions to a wiki page, in segments of 20 revisions, starting with the latest revision. The response includes API routes for the next oldest, next newest, and latest revision segments, letting you scroll through page history.
  • GET /page/{title}/history/counts/{type}
    • Description: Returns basic data about a page's history, such as the number of edits made by different types of users, or how many reverts have occurred on the page. For more information and metrics to understand how readers and editors interact with Wikipedia and other Wikimedia projects, see the Analytics API.
  • GET /search
    • Description: Searches wiki pages for the given search terms, and returns matching pages.
  • POST /transform/wikitext/to/html/
    • Description: Converts any wikitext into HTML.
  • POST /transform/html/to/wikitext/
    • Description: Converts any HTML into wikitext.
  • POST /transform/wikitext/to/html/{title}
    • Description: Converts the wikitext of a given page to HTML. The wikitext request body parameter must be provided, but can be left empty to receive the full page. The response body contains the rendered HTML of the page.
  • POST /transform/html/to/wikitext/{title}
    • Description: Converts HTML of a given page to wikitext. The html request body parameter must be provided, but can be empty to receive the full page. The response body contains the wikitext of the page.
  • POST /transform/wikitext/to/html/{title}/{revision}
    • Description: Converts the wikitext of a given revision to HTML. The wikitext request body parameter must be provided, but can be left empty to receive the full revision. The response body contains the rendered HTML of the revision.
  • POST /transform/html/to/wikitext/{title}/{revision}
    • Description: Converts HTML of a given revision to wikitext. The html request body parameter must be provided, but can be empty to receive the full revision. The response body contains the wikitext of the revision.

Change #1149994 merged by jenkins-bot:

[mediawiki/core@master] REST: Add translatable OpenAPI endpoint descriptions for all remaining endpoints

https://gerrit.wikimedia.org/r/1149994

Marking as resolved so I can archive this sprint board. Added a follow up task here for the description changes that were missed: https://phabricator.wikimedia.org/T398309