summaryrefslogtreecommitdiffstats
path: root/admin/WebConsole/rest/index.php
diff options
context:
space:
mode:
authorramon <ramongomez@us.es>2016-09-26 12:45:35 +0000
committerramon <ramongomez@us.es>2016-09-26 12:45:35 +0000
commitac8b234e30a66f826b431954d23b23d80ecb0247 (patch)
tree6da3915e2189b3461d4a9ba7342203b0aa6f5697 /admin/WebConsole/rest/index.php
parent2ff2099312f1ea3fd945fdf1e472567a2dfd4bc9 (diff)
#708: Incluir documentación de la API REST (aún no terminada), usando fichero YAML como base para generar la página HTML con el editor de Swagger.
git-svn-id: https://opengnsys.es/svn/branches/version1.1@5016 a21b9725-9963-47de-94b9-378ad31fedc9
Diffstat (limited to 'admin/WebConsole/rest/index.php')
-rw-r--r--admin/WebConsole/rest/index.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/admin/WebConsole/rest/index.php b/admin/WebConsole/rest/index.php
index c6487a05..6c13d3de 100644
--- a/admin/WebConsole/rest/index.php
+++ b/admin/WebConsole/rest/index.php
@@ -54,6 +54,16 @@ if ($config['RUN_OGADMREPO'] === "yes") {
include("repository.php");
}
+// Showing API information page.
+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";
+ }
+);
+
// Execute REST using Slim.
$app->run();