MDL-81031 admin: Add swagger UI

This commit is contained in:
Andrew Nicols 2023-10-31 10:19:46 +08:00 committed by Jun Pataleta
parent fbca10b8f3
commit 091ae55c20
No known key found for this signature in database
GPG key ID: F83510526D99E2C7
7 changed files with 148 additions and 1 deletions

View file

@ -109,7 +109,16 @@ if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
// Add the 'profiling' page to admin block.
$ADMIN->add('development', $temp);
// Web service test clients DO NOT COMMIT : THE EXTERNAL WEB PAGE IS NOT AN ADMIN PAGE !!!!!
$ADMIN->add(
parentname: 'development',
something: new admin_externalpage(
name: 'swaggerui',
visiblename: new lang_string('swaggerui', 'admin'),
url: "$CFG->wwwroot/admin/swaggerui.php",
),
);
// Web service test clients DO NOT COMMIT : THE EXTERNAL WEB PAGE IS NOT AN ADMIN PAGE !!!!!
$ADMIN->add('development', new admin_externalpage('testclient', new lang_string('testclient', 'webservice'), "$CFG->wwwroot/$CFG->admin/webservice/testclient.php"));