Fixing docs
This commit is contained in:
parent
c0e731b01a
commit
60b43cc1b4
|
@ -23,18 +23,17 @@ public class ApiDocs {
|
|||
private static Logger logger = LoggerFactory.getLogger(ApiDocs.class);
|
||||
|
||||
@GET
|
||||
// @Path("{any: .*}")
|
||||
public InputStream toDoc(@Context HttpServletRequest req) throws WebApplicationException {
|
||||
logger.trace("Called method to redirect to api-docs/index.html");
|
||||
|
||||
String pathInfo = req.getPathInfo();
|
||||
try {
|
||||
|
||||
if (pathInfo.endsWith("api-docs")) {
|
||||
if (pathInfo.endsWith("/api-docs")) {
|
||||
pathInfo += "/index.html";
|
||||
}
|
||||
|
||||
if (pathInfo.endsWith("api-docs/")) {
|
||||
if (pathInfo.endsWith("/api-docs/")) {
|
||||
pathInfo += "index.html";
|
||||
}
|
||||
|
||||
|
|
|
@ -21,22 +21,19 @@ import org.slf4j.LoggerFactory;
|
|||
public class Docs {
|
||||
|
||||
private static Logger logger = LoggerFactory.getLogger(Docs.class);
|
||||
|
||||
|
||||
|
||||
@GET
|
||||
// @Path("{any: .*}")
|
||||
public InputStream toDoc(@Context HttpServletRequest req) throws WebApplicationException {
|
||||
logger.trace("Called method to redirect to docs/index.html");
|
||||
|
||||
String pathInfo = req.getPathInfo();
|
||||
try {
|
||||
|
||||
if (pathInfo.endsWith("docs")) {
|
||||
if (pathInfo.endsWith("/docs")) {
|
||||
pathInfo += "/index.html";
|
||||
}
|
||||
|
||||
if (pathInfo.endsWith("docs/")) {
|
||||
if (pathInfo.endsWith("/docs/")) {
|
||||
pathInfo += "index.html";
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue