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" /> <java-json-client disabled="true" />
<javascript-client disabled="true" /> <javascript-client disabled="true" />
<docs docsDir="${project.build.directory}" docsSubdir="docs" /> <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]" /> --> <!-- <swagger basePath="[YOUR_APPLICATION-NAME]" /> -->
</modules> </modules>

View File

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