Description
To complete our implementation of interactive documentation and support our long term vision of validated specs, we need to define and document specific endpoint responses as JSON schemas. This includes reusable object definitions (eg: page), happy path (eg: HTTP 20x) responses per endpoint, as well as common error (eg: HTTP 40x) responses that may be used across endpoints in some cases.
https://phabricator.wikimedia.org/T375530 demonstrated this pattern for ‘page’ endpoints; we now need to replicate that pattern across all remaining endpoints, including referencing reusable response bodies across endpoints where it makes sense.
Problem statement
Before releasing the new REST API Sandbox experience across Wikimedia projects, we need to have complete coverage of the expected responses for all of the MediaWiki REST API endpoints.
Conditions of acceptance
- Reference work completed in https://phabricator.wikimedia.org/T375530 as an example case.
- Replicate the JSON schema definition pattern for the remaining endpoints currently included in the MediaWiki REST API documentation: https://www.mediawiki.org/wiki/API:REST_API/Reference#
- Search
- Transform
- Media files
- History
- Additional page endpoints:
- Metadata (bare)
- HTML
- Languages
- Attached media
Out of scope
This work only covers the existing MediaWiki REST APIs. Action APIs, extensions, and other API experiences across the Wikimedia mission are not included in the scope of this work.