REST: Introduce discovery endpoint
commit84fe1b9ccd963e0f3b8e49387a4d97cb519d0346
authordaniel <dkinzler@wikimedia.org>
Mon, 6 May 2024 13:17:08 +0000 (6 15:17 +0200)
committerDaniel Kinzler <dkinzler@wikimedia.org>
Fri, 20 Sep 2024 17:02:59 +0000 (20 17:02 +0000)
treec560253d132d4278550cd726b01efc63115a7908
parentc05a3d57ee4715f5928dfb465da33a523c69cf2d
REST: Introduce discovery endpoint

The discovery endpoint provides basic information about accessing the
wiki's APIs, as well as a directory of available modules.

Bug: T365753
Change-Id: I161aa68566da91867b650e13c8aadc87cd0c428c
19 files changed:
autoload.php
docs/rest/discovery-1.0.json [new file with mode: 0644]
docs/rest/mwapi-1.0.json
includes/DevelopmentSettings.php
includes/Rest/Handler/DiscoveryHandler.php [new file with mode: 0644]
includes/Rest/Handler/ModuleSpecHandler.php
includes/Rest/Module/ExtraRoutesModule.php
includes/Rest/Module/Module.php
includes/Rest/Module/SpecBasedModule.php
includes/Rest/Router.php
includes/Rest/coreDevelopmentRoutes.json
includes/Rest/specs.v0.json [new file with mode: 0644]
tests/api-testing/REST/Swagger.js
tests/phpunit/integration/includes/Rest/Handler/DiscoveryHandlerTest.php [copied from tests/phpunit/integration/includes/Rest/Handler/ModuleSpecHandlerTest.php with 52% similarity]
tests/phpunit/integration/includes/Rest/Handler/ModuleSpecHandlerTest.php
tests/phpunit/integration/includes/Rest/Handler/SpecTestRoutes.json
tests/phpunit/structure/RestStructureTest.php
tests/phpunit/unit/includes/Rest/Module/SpecBasedModuleTest.php
tests/phpunit/unit/includes/Rest/RouterTest.php