Restoring classes
This commit is contained in:
parent
9ac2b4c3ec
commit
df63cd50ac
|
@ -17,24 +17,24 @@ import org.slf4j.LoggerFactory;
|
||||||
/**
|
/**
|
||||||
* @author Luca Frosini (ISTI-CNR)
|
* @author Luca Frosini (ISTI-CNR)
|
||||||
*/
|
*/
|
||||||
//@Path("api-docs")
|
@Path("api-docs")
|
||||||
public class ApiDocs {
|
public class ApiDocs {
|
||||||
|
|
||||||
private static Logger logger = LoggerFactory.getLogger(ApiDocs.class);
|
private static Logger logger = LoggerFactory.getLogger(ApiDocs.class);
|
||||||
|
|
||||||
@GET
|
@GET
|
||||||
// @Path("{any: .*}")
|
@Path("{any: .*}")
|
||||||
public InputStream toDoc(@Context HttpServletRequest req) throws WebApplicationException {
|
public InputStream toDoc(@Context HttpServletRequest req) throws WebApplicationException {
|
||||||
logger.trace("Called method to redirect to api-docs/index.html");
|
logger.trace("Called method to redirect to api-docs/index.html");
|
||||||
|
|
||||||
String pathInfo = req.getPathInfo();
|
String pathInfo = req.getPathInfo();
|
||||||
try {
|
try {
|
||||||
|
|
||||||
if (pathInfo.endsWith("/api-docs")) {
|
if (pathInfo.endsWith("api-docs")) {
|
||||||
pathInfo += "/index.html";
|
pathInfo += "/index.html";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pathInfo.endsWith("/api-docs/")) {
|
if (pathInfo.endsWith("api-docs/")) {
|
||||||
pathInfo += "index.html";
|
pathInfo += "index.html";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ import org.slf4j.LoggerFactory;
|
||||||
/**
|
/**
|
||||||
* @author Luca Frosini (ISTI-CNR)
|
* @author Luca Frosini (ISTI-CNR)
|
||||||
*/
|
*/
|
||||||
//@Path("docs")
|
@Path("docs")
|
||||||
public class Docs {
|
public class Docs {
|
||||||
|
|
||||||
private static Logger logger = LoggerFactory.getLogger(Docs.class);
|
private static Logger logger = LoggerFactory.getLogger(Docs.class);
|
||||||
|
@ -25,18 +25,18 @@ public class Docs {
|
||||||
|
|
||||||
|
|
||||||
@GET
|
@GET
|
||||||
// @Path("{any: .*}")
|
@Path("{any: .*}")
|
||||||
public InputStream toDoc(@Context HttpServletRequest req) throws WebApplicationException {
|
public InputStream toDoc(@Context HttpServletRequest req) throws WebApplicationException {
|
||||||
logger.trace("Called method to redirect to docs/index.html");
|
logger.trace("Called method to redirect to docs/index.html");
|
||||||
|
|
||||||
String pathInfo = req.getPathInfo();
|
String pathInfo = req.getPathInfo();
|
||||||
try {
|
try {
|
||||||
|
|
||||||
if (pathInfo.endsWith("/docs")) {
|
if (pathInfo.endsWith("docs")) {
|
||||||
pathInfo += "/index.html";
|
pathInfo += "/index.html";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pathInfo.endsWith("/docs/")) {
|
if (pathInfo.endsWith("docs/")) {
|
||||||
pathInfo += "index.html";
|
pathInfo += "index.html";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue