improved documentation

This commit is contained in:
Francesco Mangiacrapa 2022-04-01 10:50:28 +02:00
parent e430a4acbe
commit 35f6cd7a06
2 changed files with 4 additions and 2 deletions

View File

@ -23,6 +23,8 @@
<java-json-client disabled="true" />
<javascript-client disabled="true" />
<docs docsDir="${project.build.directory}" docsSubdir="docs" />
<!-- REPLACE THE {YOUR_APPLICATION_NAME} WITH YOUR APPLICATION NAME. E.g.
/gcat, /uri-resolver /> -->
<!-- <swagger basePath="[YOUR_APPLICATION-NAME]" /> -->
</modules>

View File

@ -42,14 +42,14 @@ public class DocsGenerator {
logger.info(DocsGenerator.class.getSimpleName() + " toDoc called");
String pathInfo = req.getPathInfo();
logger.info("pathInfo {}", pathInfo);
logger.debug("pathInfo {}", pathInfo);
try {
if (pathInfo.endsWith("/docs/")) {
pathInfo += "index.html";
}
logger.info("redirecting to {}", pathInfo);
logger.info("going to {}", pathInfo);
String realPath = req.getServletContext().getRealPath(pathInfo);
return new FileInputStream(new File(realPath));