gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [gnunet] branch master updated: start REST documentation


From: gnunet
Subject: [GNUnet-SVN] [gnunet] branch master updated: start REST documentation
Date: Tue, 03 Apr 2018 11:08:00 +0200

This is an automated email from the git hooks/post-receive script.

martin-schanzenbach pushed a commit to branch master
in repository gnunet.

The following commit(s) were added to refs/heads/master by this push:
     new e331d5f6d start REST documentation
e331d5f6d is described below

commit e331d5f6dfb406f9c56d4b3cb69b671b317d6992
Author: Schanzenbach, Martin <address@hidden>
AuthorDate: Tue Apr 3 11:07:56 2018 +0200

    start REST documentation
---
 contrib/Dockerfile                        |  2 +-
 doc/documentation/chapters/developer.texi | 54 +++++++++++++++++++++++++++++++
 2 files changed, 55 insertions(+), 1 deletion(-)

diff --git a/contrib/Dockerfile b/contrib/Dockerfile
index a22109bb1..d2f2d7c97 100644
--- a/contrib/Dockerfile
+++ b/contrib/Dockerfile
@@ -47,7 +47,7 @@ RUN make -j$NUM_JOBS
 RUN make install
 
 RUN groupadd gnunetdns
-RUN adduser --system -m --home-dir /var/lib/gnunet gnunet
+RUN adduser -S -m -h /var/lib/gnunet gnunet
 RUN chown gnunet:gnunet /var/lib/gnunet
 RUN echo '[arm]\nSYSTEM_ONLY = YES\nUSER_ONLY = NO\n' > /etc/gnunet.conf
 
diff --git a/doc/documentation/chapters/developer.texi 
b/doc/documentation/chapters/developer.texi
index c7d7ddaac..e95355302 100644
--- a/doc/documentation/chapters/developer.texi
+++ b/doc/documentation/chapters/developer.texi
@@ -75,6 +75,7 @@ new chapters, sections or insightful comments.
 * REVOCATION Subsystem::
 * File-sharing (FS) Subsystem::
 * REGEX Subsystem::
+* REST Subsystem::
 @end menu
 
 @node Developer Introduction
@@ -8365,3 +8366,56 @@ create_strings.py <input path> <outfile>
 @noindent
 to create a search strings file from the previously created
 regular expressions.
+
address@hidden REST subsystem
address@hidden REST Subsystem
address@hidden REST Subsystem
+
address@hidden %**end of header
+
+Using the REST subsystem, you can expose REST-based APIs or services.
+The REST service is designed as a pluggable architecture.
+To create a new REST endpoint, simply add a library in the form 
+``plugin_rest_*''.
+The REST service will automatically load all REST plugins on startup.
+
address@hidden
+
+The rest service can be configured in various ways.
+The reference config file can be found in 
address@hidden/rest/rest.conf}:
address@hidden
+[rest]
+REST_PORT=7776
+REST_ALLOW_HEADERS=Authorization,Accept,Content-Type
+REST_ALLOW_ORIGIN=*
+REST_ALLOW_CREDENTIALS=true
address@hidden example
+
+The port as well as Cross-origin resource sharing (CORS) headers that
+are supposed to be advertised by the rest service are configurable.
+
address@hidden
+* Namespace considerations::
+* Endpoint documentation::
address@hidden menu
+
address@hidden Namespace considerations
address@hidden Namespace considerations
+
+The gnunet-rest-service will load all plugins that are installed.
+As such it is important that the endpoint namespaces do not clash.
+For example, plugin X might expose the endpoint ``/xxx'' while plugin Y exposes
+endpoint ``/xxx/yyy''.
+This is a problem if plugins X is also supposed to handle a call to 
+``/xxx/yyy''.
+Currently, the REST service will not complain or warn about such clashes so
+please make sure that endpoints are unambiguous.
+
address@hidden Endpoint documentation
address@hidden Endpoint documentation
+
+This is WIP. Endpoints should be documented appropriately.
+Perferably using annotations.
+
+

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]