RED-6162 - fixed swagger url

This commit is contained in:
Timo Bejan 2023-03-10 12:57:18 +02:00
parent 2126073c59
commit c58c9012bf
6 changed files with 9 additions and 12 deletions

View File

@ -76,11 +76,9 @@ public class SecuredKeyCloakConfiguration extends KeycloakWebSecurityConfigurerA
web.ignoring().antMatchers("/actuator/health/**",
"/redaction-gateway-v1/async/download/with-ott/**",
"/api/async/download/with-ott/**",
"/api/docs",
"/api/docs/**",
"/",
"/api",
"/redaction-gateway-v1/docs/**",
"/redaction-gateway-v1/docs",
"/redaction-gateway-v1",
"/internal-api/**");
web.ignoring().antMatchers(HttpMethod.OPTIONS, "/**");

View File

@ -38,7 +38,7 @@ public class GeneralConfigurationService {
return GeneralConfigurationModel.builder()
.auxiliaryName(auxiliaryName)
.displayName(realm.getDisplayNameHtml())
.forgotPasswordFunctionEnabled(realm.isResetPasswordAllowed())
.forgotPasswordFunctionEnabled(realm.isResetPasswordAllowed() != null && realm.isResetPasswordAllowed())
.build();
}

View File

@ -50,7 +50,6 @@ public class SwaggerAutoConfiguration {
private static final String DESCRIPTION = "Description for redaction";
private static final String VERSION = "1.0";
private static final String OAUTH_NAME = "RED-OAUTH";
private static final String PROTOCOL_URL_FORMAT = "/auth/realms/%s/protocol/openid-connect";
@Autowired

View File

@ -29,10 +29,10 @@ public class SwaggerHomeController {
}
@GetMapping({"/api", "/"})
@GetMapping({"/redaction-gateway-v1", "/","redaction-gateway-v1/docs"})
public void home(HttpServletRequest request, HttpServletResponse response) throws IOException {
response.sendRedirect(contextPath + "/api/docs/swagger-ui");
response.sendRedirect(contextPath + "/redaction-gateway-v1/docs/swagger-ui");
}
}

View File

@ -61,7 +61,7 @@ commons:
keycloak:
applicationClientId: redaction
clientId: redaction-system
clientSecret: NSQmQWTBAPH4HwJXIFQQdazigWP8EHgg
clientSecret: G5E1qLU8ZNdDv7HY5BNLPdt5nXdeF7cU
realm: redaction
serverUrl: http://localhost:8080
issuer: ''

View File

@ -154,11 +154,11 @@ commons:
springdoc:
swagger-ui:
path: /api/docs/swagger-ui
path: /redaction-gateway-v1/docs/swagger-ui
operations-sorter: alpha
tags-sorter: alpha
api-docs:
path: /api/docs
path: /redaction-gateway-v1/docs
pre-loading-enabled: true
packages-to-scan: ['com.iqser.red.persistence.service.v1.external.api']