Skip to content

Commit c1537fd

Browse files
Swagger changes
1 parent 82c19b8 commit c1537fd

3 files changed

Lines changed: 8 additions & 0 deletions

File tree

src/main/environment/common_ci.properties

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,3 +82,5 @@ jwt.secret=@env.JWT_SECRET_KEY@
8282
#ELK logging file name
8383
logging.file.name=@env.MMU_API_LOGGING_FILE_NAME@
8484

85+
springdoc.api-docs.enabled=@env.SWAGGER_DOC_ENABLED@
86+
springdoc.swagger-ui.enabled=@env.SWAGGER_DOC_ENABLED@

src/main/java/com/iemr/mmu/utils/JwtUserIdValidationFilter.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ public void doFilter(ServletRequest servletRequest, ServletResponse servletRespo
5555
// Skip login and public endpoints
5656
if (path.equals(contextPath + "/user/userAuthenticate")
5757
|| path.equalsIgnoreCase(contextPath + "/user/logOutUserFromConcurrentSession")
58+
|| path.startsWith(contextPath + "/swagger-ui")
59+
|| path.startsWith(contextPath + "/v3/api-docs")
60+
|| path.startsWith(contextPath + "/user/refreshToken")
5861
|| path.startsWith(contextPath + "/public")) {
5962
logger.info("Skipping filter for path: " + path);
6063
filterChain.doFilter(servletRequest, servletResponse);

src/main/java/com/iemr/mmu/utils/http/HttpInterceptor.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@ public boolean preHandle(HttpServletRequest request, HttpServletResponse respons
8585
case "ui":
8686
case "swagger-resources":
8787
case "api-docs":
88+
case "index.html":
89+
case "swagger-initializer.js":
90+
case "swagger-config":
8891

8992
break;
9093
case "error":

0 commit comments

Comments
 (0)