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/**", web.ignoring().antMatchers("/actuator/health/**",
"/redaction-gateway-v1/async/download/with-ott/**", "/redaction-gateway-v1/async/download/with-ott/**",
"/api/async/download/with-ott/**", "/redaction-gateway-v1/docs/**",
"/api/docs", "/redaction-gateway-v1/docs",
"/api/docs/**", "/redaction-gateway-v1",
"/",
"/api",
"/internal-api/**"); "/internal-api/**");
web.ignoring().antMatchers(HttpMethod.OPTIONS, "/**"); web.ignoring().antMatchers(HttpMethod.OPTIONS, "/**");

View File

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

View File

@ -50,7 +50,6 @@ public class SwaggerAutoConfiguration {
private static final String DESCRIPTION = "Description for redaction"; private static final String DESCRIPTION = "Description for redaction";
private static final String VERSION = "1.0"; private static final String VERSION = "1.0";
private static final String OAUTH_NAME = "RED-OAUTH"; private static final String OAUTH_NAME = "RED-OAUTH";
private static final String PROTOCOL_URL_FORMAT = "/auth/realms/%s/protocol/openid-connect"; private static final String PROTOCOL_URL_FORMAT = "/auth/realms/%s/protocol/openid-connect";
@Autowired @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 { 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: keycloak:
applicationClientId: redaction applicationClientId: redaction
clientId: redaction-system clientId: redaction-system
clientSecret: NSQmQWTBAPH4HwJXIFQQdazigWP8EHgg clientSecret: G5E1qLU8ZNdDv7HY5BNLPdt5nXdeF7cU
realm: redaction realm: redaction
serverUrl: http://localhost:8080 serverUrl: http://localhost:8080
issuer: '' issuer: ''

View File

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