diff --git a/Makefile b/Makefile
index fd189574f..ab34e4dab 100644
--- a/Makefile
+++ b/Makefile
@@ -1183,3 +1183,11 @@ e2e_cert:
-reqexts SAN \
-extensions SAN \
-config e2e-tests/openssl.cnf
+
+api_doc: doc/sources/manager-api/openapi-spec.yaml doc/sources/manager-api/config-codegen.json
+ @if [ -f "$(SWAGGER_CODEGEN)" ] ; then \
+ java -jar "$(SWAGGER_CODEGEN)" generate -i doc/sources/manager-api/openapi-spec.yaml -l html2 -o doc/pages/manager-api/ -c doc/sources/manager-api/config-codegen.json; \
+ else \
+ echo "Please run me with SWAGGER_CODEGEN=/path/to/swagger-codegen.jar"; \
+ fi
+
diff --git a/_example/etc/api-apache2.4.conf b/_example/etc/api-apache2.4.conf
index 112c5d7ab..53abd3403 100644
--- a/_example/etc/api-apache2.4.conf
+++ b/_example/etc/api-apache2.4.conf
@@ -40,6 +40,7 @@
# RewriteCond "%{REQUEST_URI}" "!\.html(?:/.*)?$"
# REST URLs
+ RewriteCond "%{REQUEST_URI}" "!^/(?:doc)"
RewriteRule "^/(.+)$" "/api.fcgi/$1" [PT]
# 2) FastCGI engine
@@ -83,6 +84,15 @@
+ # On-line documentation
+ Alias /doc/ __DEFDOCDIR__
+
+ Require all granted
+ ErrorDocument 404 /notfound.html
+ Options +FollowSymLinks
+ DirectoryIndex index.html start.html
+
+
# Uncomment this if site if you use SSL only
#Header set Strict-Transport-Security "max-age=15768000"
diff --git a/_example/etc/api-apache2.X.conf b/_example/etc/api-apache2.X.conf
index 93eed0a1b..ffcc7425c 100644
--- a/_example/etc/api-apache2.X.conf
+++ b/_example/etc/api-apache2.X.conf
@@ -40,6 +40,7 @@
# RewriteCond "%{REQUEST_URI}" "!\.html(?:/.*)?$"
# REST URLs
+ RewriteCond "%{REQUEST_URI}" "!^/(?:doc)"
RewriteRule "^/(.+)$" "/api.fcgi/$1" [PT]
# 2) FastCGI engine
@@ -90,6 +91,21 @@
+ # On-line documentation
+ Alias /doc/ __DEFDOCDIR__
+
+ = 2.3>
+ Require all granted
+
+
+ Order Deny,Allow
+ Allow from all
+
+ ErrorDocument 404 /notfound.html
+ Options +FollowSymLinks
+ DirectoryIndex index.html start.html
+
+
# Uncomment this if site if you use SSL only
#Header set Strict-Transport-Security "max-age=15768000"
diff --git a/_example/etc/api-apache2.conf b/_example/etc/api-apache2.conf
index 4f3854290..f362c8778 100644
--- a/_example/etc/api-apache2.conf
+++ b/_example/etc/api-apache2.conf
@@ -40,6 +40,7 @@
# RewriteCond "%{REQUEST_URI}" "!\.html(?:/.*)?$"
# REST URLs
+ RewriteCond "%{REQUEST_URI}" "!^/(?:doc)"
RewriteRule "^/(.+)$" "/api.fcgi/$1" [PT]
# 2) FastCGI engine
@@ -84,6 +85,16 @@
+ # On-line documentation
+ Alias /doc/ __DEFDOCDIR__
+
+ Order allow,deny
+ Allow from all
+ ErrorDocument 404 /notfound.html
+ Options +FollowSymLinks
+ DirectoryIndex index.html start.html
+
+
# Uncomment this if site if you use SSL only
#Header set Strict-Transport-Security "max-age=15768000"
diff --git a/_example/etc/api-nginx.conf b/_example/etc/api-nginx.conf
index e4fa1d5f2..3f9668c1d 100644
--- a/_example/etc/api-nginx.conf
+++ b/_example/etc/api-nginx.conf
@@ -15,7 +15,13 @@ server {
#set_real_ip_from 127.0.0.1;
#real_ip_header X-Forwarded-For;
- rewrite ^/(.*)$ /api.psgi/$1 break;
+ location /doc/ {
+ alias /usr/share/doc/lemonldap-ng-doc/;
+ index index.html start.html;
+ }
+ location / {
+ rewrite ^/(.*)$ /api.psgi/$1;
+ }
location ~ ^(?/.*\.psgi)(?:$|/) {
@@ -37,17 +43,18 @@ server {
# Uncomment this if you use https only
#add_header Strict-Transport-Security "max-age=15768000";
- # By default, access to this VHost is denied
- # If you want to enable the manager APIs, you MUST
- # implement a robust authentication scheme to protect this
- # VHost since LemonLDAP::NG provides no protection to the
- # Manager APIs yet
- #
- #allow 127.0.0.0/8;
- #allow ::1/128;
- deny all;
}
+ # By default, access to this VHost is denied
+ # If you want to enable the manager APIs, you MUST
+ # implement a robust authentication scheme to protect this
+ # VHost since LemonLDAP::NG provides no protection to the
+ # Manager APIs yet
+ #
+ #allow 127.0.0.0/8;
+ #allow ::1/128;
+ deny all;
+
# DEBIAN
# If install was made with USEDEBIANLIBS (official releases), uncomment this
#location /javascript/ {
diff --git a/doc/index.html b/doc/index.html
index 4b1c93b32..2eeb7c1d1 100644
--- a/doc/index.html
+++ b/doc/index.html
@@ -5,9 +5,14 @@
-
LemonLDAP::NG offline documentation
+
LemonLDAP::NG Administrator documentation
Documentation
+
+
LemonLDAP::NG Manager API documentation
+
+
API Reference
+