From dfdf9ba361ac344f269df51d8c1be73d07d26c23 Mon Sep 17 00:00:00 2001 From: Claudio Maggioni Date: Mon, 9 Mar 2020 23:12:39 +0100 Subject: [PATCH] Added all paths to swagger documentation --- .../sa4/sanmarinoes/smarthut/config/SpringFoxConfig.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/main/java/ch/usi/inf/sa4/sanmarinoes/smarthut/config/SpringFoxConfig.java b/src/main/java/ch/usi/inf/sa4/sanmarinoes/smarthut/config/SpringFoxConfig.java index 041f7c7..4011592 100644 --- a/src/main/java/ch/usi/inf/sa4/sanmarinoes/smarthut/config/SpringFoxConfig.java +++ b/src/main/java/ch/usi/inf/sa4/sanmarinoes/smarthut/config/SpringFoxConfig.java @@ -8,6 +8,7 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; import springfox.documentation.builders.ApiInfoBuilder; +import springfox.documentation.builders.PathSelectors; import springfox.documentation.builders.RequestHandlerSelectors; import springfox.documentation.service.ApiInfo; import springfox.documentation.service.ApiKey; @@ -67,10 +68,7 @@ public class SpringFoxConfig { * @return A predicate that tests whether a path must be included or not */ private Predicate paths() { - return regexPredicate("/auth.*") - .or(regexPredicate("/room.*")) - .or(regexPredicate("/register.*")) - .or(regexPredicate("/")); + return PathSelectors.any()::apply; } /**