Description
The Wikidata team has created a high quality spec. As of right now, the MediaWiki REST framework cannot support generation on all fields and features utilized in that spec. To ensure we are delivering the best possible developer experience, we should opt to surface the high quality spec instead of the default generated API module spec.
Conditions of acceptance
- Wikibase is available as an API module in the REST Sandbox dropdown on projects where the extension is installed
- Wikibase module points to the higher quality spec defined and owned by the WMDE Wikidata team
- Remove Wikibase routes from MediaWiki 'flat route' structure to avoid confusion and conflicting information
Implementation details
The high quality spec can be retrieved through this endpoint: https://www.wikidata.org/w/rest.php/wikibase/v1/openapi.json
Because this is a manually managed spec, we expect that the server option will not be correct at this time. By default, the server options will include "example" and "Wikidata" as options on all Wikis.
OPEN QUESTIONS:
- Is there any meaningful divide between what is defined as wikidata vs wikibase in this case? the base URL is specifically connected to the Wikidata project, but is presented as the Wikibase REST API.
- Is there a way for us to populate the server field dynamically? Perhaps by specifying a parameter when requesting the spec from Wikidata? --> this would have a dependency on the Wikidata team.