summaryrefslogtreecommitdiffstats
path: root/admin/WebConsole/rest/index.php
diff options
context:
space:
mode:
authorramon <ramongomez@us.es>2016-09-29 17:00:15 +0000
committerramon <ramongomez@us.es>2016-09-29 17:00:15 +0000
commit8b8e948eaa19e03a4d0faa7b182b704ce16c56f2 (patch)
treeb0c4c5039415d9621dad2ab2fdfb36968df3e464 /admin/WebConsole/rest/index.php
parent72d37836f87142047f0c72be7bda1b77b7ec7bae (diff)
#708: Instalar librería Swagger-UI en el servidor para documentar la API REST a partir del fichero YAML.
git-svn-id: https://opengnsys.es/svn/branches/version1.1@5022 a21b9725-9963-47de-94b9-378ad31fedc9
Diffstat (limited to 'admin/WebConsole/rest/index.php')
-rw-r--r--admin/WebConsole/rest/index.php9
1 files changed, 3 insertions, 6 deletions
diff --git a/admin/WebConsole/rest/index.php b/admin/WebConsole/rest/index.php
index d796a043..4f472cf1 100644
--- a/admin/WebConsole/rest/index.php
+++ b/admin/WebConsole/rest/index.php
@@ -55,13 +55,10 @@ if ($config['RUN_OGADMREPO'] === "yes") {
include("repository.php");
}
-// Showing API information page.
+// Showing API information page using Swagger-UI.
app->get('/',
- function() {
- if (is_readable(__DIR__."/opengnsys-api.html"))
- include("opengnsys-api.html");
- else
- echo "<strong>Cannot access OpenGnsys REST API information page.</strong>\n";
+ function() use ($app) {
+ $app->response->redirect('swagger-ui/index.html?url=../../opengnsys-api.yml');
}
);