Skip to content

Commit

Permalink
#873 - fix open api specification issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
grabdoc committed Mar 8, 2025
1 parent 9164812 commit a91c47e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ public class DatabaseContextRequestInterceptor implements AsyncHandlerIntercepto

@Override
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) {
log.debug("Pre handle - {}", request.getRequestURI());
log.info("Pre handle - {}", request.getRequestURI());
log.info("White listed : {}", isWhileListed(request.getRequestURI()));

if (!isWhileListed(request.getRequestURI())) {
final Map<String, String> pathVariables = (Map<String, String>) request
Expand All @@ -54,6 +55,7 @@ public boolean preHandle(HttpServletRequest request, HttpServletResponse respons
}
}


return true;
}

Expand Down
4 changes: 2 additions & 2 deletions auth/src/main/java/com/homihq/db2rest/auth/AuthFilter.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ protected void doFilterInternal(
final FilterChain filterChain
) throws ServletException, IOException {

log.debug("Handling Auth");
log.info("Handling Auth - {}", authProvider);

String requestUri = urlPathHelper.getRequestUri(request);
String method = request.getMethod();

log.debug("Request URI - {}", requestUri);
log.info("Request URI - {}", requestUri);

if (!authProvider.isExcluded(requestUri, method)) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public abstract class AbstractAuthProvider {

private static final String AUTH_HEADER = "Authorization";

private final String[] DEFAULT_WHITELIST = {"/actuator/**"};
private final String[] DEFAULT_WHITELIST = {"/swagger-ui/**", "/v3/api-docs/**", "/actuator/**"};

public abstract boolean canHandle(HttpServletRequest request);

Expand Down
4 changes: 2 additions & 2 deletions rest-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
<version>2.5.0</version>
<version>2.8.5</version>
</dependency>

<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-starter-webmvc-api</artifactId>
<version>2.5.0</version>
<version>2.8.5</version>
</dependency>

<dependency>
Expand Down

0 comments on commit a91c47e

Please sign in to comment.