docs ready
This commit is contained in:
parent
b05208680b
commit
42deae87db
|
@ -15,7 +15,7 @@ organizations and how they are mapped to D4Science concepts.
|
|||
|
||||
The web services exposes a subset of such functionalities over **https in a standard, reliable and secure way**.
|
||||
|
||||
See the vailable REST-API at a glance on `D4Science Developers Website <https://dev.d4science.org/>`_.
|
||||
See the vailable REST-API at a glance on `its API docs <../api-docs/index.html>`_.
|
||||
|
||||
|
||||
|
||||
|
@ -24,7 +24,7 @@ See the vailable REST-API at a glance on `D4Science Developers Website <https://
|
|||
Base URL
|
||||
==================
|
||||
|
||||
In the production environment, its current value is https://api.d4science.org/
|
||||
In the production environment, its current value is https://api.d4science.org/rest
|
||||
|
||||
Authorization
|
||||
==================
|
||||
|
@ -38,7 +38,7 @@ Obtain your Bearer token here: https://dev.d4science.org/how-to-access-resources
|
|||
Java Client
|
||||
==================
|
||||
|
||||
The methods of the Web Service can be called by writing your own REST client application or by using (a lot of) already existent rest client plugins. We provide a Java Client out-of-the-box.
|
||||
The methods of the Web Service can be called by writing your own REST client application or by using already existing REST client plugins. We provide the following Java Client out-of-the-box.
|
||||
|
||||
|
||||
.. TIP::
|
||||
|
@ -54,7 +54,7 @@ The methods of the Web Service can be called by writing your own REST client app
|
|||
|
||||
**Methods Result**
|
||||
|
||||
The service exposes its methods using a standard naming approach. Moreover, they accept (in case of http POST/PUT methods) JSON objects.
|
||||
The service exposes `its methods <../api-docs/index.html>`_ using a standard naming approach. Moreover, they accept (in case of http POST/PUT methods) JSON objects.
|
||||
|
||||
.. IMPORTANT::
|
||||
The result of all methods is always a JSON object as per below:
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
<!-- </package-conversions> -->
|
||||
<!-- </java-json-client> -->
|
||||
<javascript-client disabled="true" />
|
||||
<docs docsDir="${project.build.directory}" docsSubdir="apidocs" />
|
||||
<docs docsDir="${project.build.directory}" docsSubdir="api-docs" />
|
||||
<docs
|
||||
freemarkerTemplate="${project.basedir}/src/main/resources/META-INF/enunciate/d4science_docs.fmt">
|
||||
<additional-css
|
||||
|
|
4
pom.xml
4
pom.xml
|
@ -365,8 +365,8 @@
|
|||
<outputDirectory>target</outputDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<targetPath>${project.build.directory}/${project.artifactId}-${project.version}/apidocs</targetPath>
|
||||
<directory>${project.build.directory}/apidocs</directory>
|
||||
<targetPath>${project.build.directory}/${project.artifactId}-${project.version}/api-docs</targetPath>
|
||||
<directory>${project.build.directory}/api-docs</directory>
|
||||
<filtering>true</filtering>
|
||||
</resource>
|
||||
</resources>
|
||||
|
|
|
@ -13,7 +13,7 @@ import javax.ws.rs.core.Context;
|
|||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@Path("apidocs")
|
||||
@Path("api-docs")
|
||||
public class DocsGenerator {
|
||||
|
||||
private static Logger logger = LoggerFactory.getLogger(DocsGenerator.class);
|
||||
|
@ -27,8 +27,8 @@ public class DocsGenerator {
|
|||
logger.debug("pathInfo {}", pathInfo);
|
||||
try {
|
||||
|
||||
if (pathInfo.endsWith("/apidocs/")) {
|
||||
pathInfo += "index.html";
|
||||
if (pathInfo.endsWith("/api-docs")) {
|
||||
pathInfo += "/index.html";
|
||||
}
|
||||
|
||||
logger.info("going to {}", pathInfo);
|
||||
|
|
|
@ -4,5 +4,6 @@
|
|||
<version>2.5.0-SNAPSHOT</version>
|
||||
<description>SocialNetworking Service</description>
|
||||
<local-persistence location='target' />
|
||||
<exclude>/api-docs/*</exclude>
|
||||
<exclude>/docs/*</exclude>
|
||||
</application>
|
Loading…
Reference in New Issue