wiki.techinc.nl/languages
daniel c01b7c7b4b Add Special:RestSandbox for exploring REST API
Special:RestSandbox presents a Swagger-UI interface for exploring REST APIs. The available APIs can be configured using RestSandboxSpecs.

For now, the default is to support no APIs, so the feature is disabled in production. In the future, it would make sense to expose the wiki's own REST API per default. The corresponding entry in $wgRestSandboxSpecs in LocalSettings.php would look like this:

	'mw' => [
		'url' => $wgScriptPath . '/rest.php/',
		'name' => 'MediaWiki REST API',
	]

Note that the spec URL may still change.

To also explore the endpoints exposed through RESTbase, we might add:

	'wmf-restbase' => [
		'url' => $wgServer . '/api/rest_v1/',
		'name' => 'Wikimedia RESTbase API',
	]

Similarly, we could expose a spec for endpoints on api.wikimedia.org, which could then be explored using the new special page.

NOTE: This adds a dependency on the swagger-ui npm library. See T325558 for the security review.

Bug: T362006
Change-Id: I1dd5ed82680a28f9c15136b446a2de0398525061
2024-06-13 21:40:36 +02:00
..
data
i18n Add Special:RestSandbox for exploring REST API 2024-06-13 21:40:36 +02:00
messages Add Special:RestSandbox for exploring REST API 2024-06-13 21:40:36 +02:00
.htaccess Update Apache config syntax in .htaccess files 2024-03-23 23:36:31 -04:00