Skip to content

Commit 6bb2c8b

Browse files
committed
Merge branch 'abdelmoez-guetat-fix-swaggerui-webflux-url'
2 parents 174e4d8 + e3b4311 commit 6bb2c8b

38 files changed

+151
-171
lines changed

springdoc-openapi-starter-webflux-ui/src/main/java/org/springdoc/webflux/ui/SwaggerConfig.java

+5-7
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@
2626

2727
package org.springdoc.webflux.ui;
2828

29-
import java.util.Optional;
30-
3129
import org.springdoc.core.configuration.SpringDocConfiguration;
3230
import org.springdoc.core.properties.SpringDocConfigProperties;
3331
import org.springdoc.core.properties.SwaggerUiConfigProperties;
@@ -36,7 +34,6 @@
3634
import org.springdoc.core.providers.ObjectMapperProvider;
3735
import org.springdoc.core.providers.SpringWebProvider;
3836
import org.springdoc.webflux.core.providers.SpringWebFluxProvider;
39-
4037
import org.springframework.boot.actuate.autoconfigure.endpoint.web.WebEndpointProperties;
4138
import org.springframework.boot.actuate.autoconfigure.web.server.ConditionalOnManagementPort;
4239
import org.springframework.boot.actuate.autoconfigure.web.server.ManagementPortType;
@@ -54,6 +51,8 @@
5451
import org.springframework.context.annotation.Lazy;
5552
import org.springframework.web.reactive.config.WebFluxConfigurer;
5653

54+
import java.util.Optional;
55+
5756
import static org.springdoc.core.utils.Constants.SPRINGDOC_SWAGGER_UI_ENABLED;
5857
import static org.springdoc.core.utils.Constants.SPRINGDOC_USE_MANAGEMENT_PORT;
5958
import static org.springdoc.core.utils.Constants.SPRINGDOC_USE_ROOT_PATH;
@@ -131,7 +130,7 @@ SwaggerUiHome swaggerUiHome(Optional<WebFluxProperties> optionalWebFluxPropertie
131130
SwaggerWebFluxConfigurer swaggerWebFluxConfigurer(SwaggerUiConfigProperties swaggerUiConfigProperties,
132131
SpringDocConfigProperties springDocConfigProperties, SwaggerIndexTransformer swaggerIndexTransformer,
133132
Optional<ActuatorProvider> actuatorProvider, SwaggerResourceResolver swaggerResourceResolver) {
134-
return new SwaggerWebFluxConfigurer(swaggerUiConfigProperties,springDocConfigProperties, swaggerIndexTransformer, actuatorProvider, swaggerResourceResolver);
133+
return new SwaggerWebFluxConfigurer(swaggerUiConfigProperties, springDocConfigProperties, swaggerIndexTransformer, actuatorProvider, swaggerResourceResolver);
135134
}
136135

137136
/**
@@ -199,15 +198,14 @@ static class SwaggerActuatorWelcomeConfiguration {
199198
* @param swaggerUiConfig the swagger ui config
200199
* @param springDocConfigProperties the spring doc config properties
201200
* @param webEndpointProperties the web endpoint properties
202-
* @param managementServerProperties the management server properties
203201
* @return the swagger welcome actuator
204202
*/
205203
@Bean
206204
@ConditionalOnMissingBean
207205
@Lazy(false)
208206
SwaggerWelcomeActuator swaggerActuatorWelcome(SwaggerUiConfigProperties swaggerUiConfig, SpringDocConfigProperties springDocConfigProperties,
209-
WebEndpointProperties webEndpointProperties, ManagementServerProperties managementServerProperties) {
210-
return new SwaggerWelcomeActuator(swaggerUiConfig, springDocConfigProperties, webEndpointProperties, managementServerProperties);
207+
WebEndpointProperties webEndpointProperties) {
208+
return new SwaggerWelcomeActuator(swaggerUiConfig, springDocConfigProperties, webEndpointProperties);
211209
}
212210
}
213211
}

springdoc-openapi-starter-webflux-ui/src/main/java/org/springdoc/webflux/ui/SwaggerWebFluxConfigurer.java

+16-3
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
* * * *
2222
* * *
2323
* *
24-
*
24+
*
2525
*/
2626

2727
package org.springdoc.webflux.ui;
@@ -38,6 +38,7 @@
3838
import static org.springdoc.core.utils.Constants.ALL_PATTERN;
3939
import static org.springdoc.core.utils.Constants.CLASSPATH_RESOURCE_LOCATION;
4040
import static org.springdoc.core.utils.Constants.DEFAULT_WEB_JARS_PREFIX_URL;
41+
import static org.springdoc.core.utils.Constants.SWAGGER_UI_PREFIX;
4142
import static org.springframework.util.AntPathMatcher.DEFAULT_PATH_SEPARATOR;
4243

4344
/**
@@ -100,8 +101,20 @@ public void addResourceHandlers(ResourceHandlerRegistry registry) {
100101
uiRootPath.append(swaggerPath, 0, swaggerPath.lastIndexOf(DEFAULT_PATH_SEPARATOR));
101102
if (actuatorProvider.isPresent() && actuatorProvider.get().isUseManagementPort())
102103
uiRootPath.append(actuatorProvider.get().getBasePath());
103-
registry.addResourceHandler(uiRootPath + springDocConfigProperties.getWebjars().getPrefix() + ALL_PATTERN)
104-
.addResourceLocations(CLASSPATH_RESOURCE_LOCATION + DEFAULT_WEB_JARS_PREFIX_URL + DEFAULT_PATH_SEPARATOR)
104+
105+
String webjarsPrefix = springDocConfigProperties.getWebjars().getPrefix();
106+
String resourcePath,swaggerUiPrefix;
107+
108+
if (DEFAULT_WEB_JARS_PREFIX_URL.equals(webjarsPrefix)) {
109+
swaggerUiPrefix = SWAGGER_UI_PREFIX;
110+
resourcePath = webjarsPrefix + SWAGGER_UI_PREFIX + DEFAULT_PATH_SEPARATOR + swaggerUiConfigProperties.getVersion();
111+
} else {
112+
swaggerUiPrefix = webjarsPrefix;
113+
resourcePath = DEFAULT_WEB_JARS_PREFIX_URL + DEFAULT_PATH_SEPARATOR;
114+
}
115+
116+
registry.addResourceHandler(uiRootPath + swaggerUiPrefix + ALL_PATTERN)
117+
.addResourceLocations(CLASSPATH_RESOURCE_LOCATION + resourcePath)
105118
.resourceChain(false)
106119
.addResolver(swaggerResourceResolver)
107120
.addTransformer(swaggerIndexTransformer);

springdoc-openapi-starter-webflux-ui/src/main/java/org/springdoc/webflux/ui/SwaggerWelcomeActuator.java

+12-33
Original file line numberDiff line numberDiff line change
@@ -26,24 +26,20 @@
2626

2727
package org.springdoc.webflux.ui;
2828

29-
import java.util.Map;
30-
3129
import io.swagger.v3.oas.annotations.Operation;
32-
import org.apache.commons.lang3.StringUtils;
3330
import org.springdoc.core.properties.SpringDocConfigProperties;
3431
import org.springdoc.core.properties.SwaggerUiConfigParameters;
3532
import org.springdoc.core.properties.SwaggerUiConfigProperties;
36-
import reactor.core.publisher.Mono;
37-
3833
import org.springframework.boot.actuate.autoconfigure.endpoint.web.WebEndpointProperties;
39-
import org.springframework.boot.actuate.autoconfigure.web.server.ManagementServerProperties;
4034
import org.springframework.boot.actuate.endpoint.web.annotation.ControllerEndpoint;
4135
import org.springframework.http.MediaType;
4236
import org.springframework.http.server.reactive.ServerHttpRequest;
4337
import org.springframework.http.server.reactive.ServerHttpResponse;
4438
import org.springframework.web.bind.annotation.GetMapping;
4539
import org.springframework.web.bind.annotation.ResponseBody;
46-
import org.springframework.web.util.UriComponentsBuilder;
40+
import reactor.core.publisher.Mono;
41+
42+
import java.util.Map;
4743

4844
import static org.springdoc.core.utils.Constants.DEFAULT_API_DOCS_ACTUATOR_URL;
4945
import static org.springdoc.core.utils.Constants.DEFAULT_SWAGGER_UI_ACTUATOR_PATH;
@@ -68,26 +64,18 @@ public class SwaggerWelcomeActuator extends SwaggerWelcomeCommon {
6864
*/
6965
private final WebEndpointProperties webEndpointProperties;
7066

71-
/**
72-
* The Management server properties.
73-
*/
74-
private final ManagementServerProperties managementServerProperties;
75-
7667
/**
7768
* Instantiates a new Swagger welcome.
7869
*
79-
* @param swaggerUiConfig the swagger ui config
80-
* @param springDocConfigProperties the spring doc config properties
81-
* @param webEndpointProperties the web endpoint properties
82-
* @param managementServerProperties the management server properties
70+
* @param swaggerUiConfig the swagger ui config
71+
* @param springDocConfigProperties the swagger ui config parameters
72+
* @param webEndpointProperties the web endpoint properties
8373
*/
8474
public SwaggerWelcomeActuator(SwaggerUiConfigProperties swaggerUiConfig
8575
, SpringDocConfigProperties springDocConfigProperties,
86-
WebEndpointProperties webEndpointProperties,
87-
ManagementServerProperties managementServerProperties) {
76+
WebEndpointProperties webEndpointProperties) {
8877
super(swaggerUiConfig, springDocConfigProperties);
8978
this.webEndpointProperties = webEndpointProperties;
90-
this.managementServerProperties = managementServerProperties;
9179
}
9280

9381
/**
@@ -104,12 +92,11 @@ public Mono<Void> redirectToUi(ServerHttpRequest request, ServerHttpResponse res
10492
return super.redirectToUi(request, response);
10593
}
10694

107-
10895
/**
109-
* Gets swagger ui config.
96+
* Openapi yaml map.
11097
*
11198
* @param request the request
112-
* @return the swagger ui config
99+
* @return the map
113100
*/
114101
@Operation(hidden = true)
115102
@GetMapping(value = SWAGGER_CONFIG_ACTUATOR_URL, produces = MediaType.APPLICATION_JSON_VALUE)
@@ -120,23 +107,15 @@ public Map<String, Object> getSwaggerUiConfig(ServerHttpRequest request) {
120107
}
121108

122109
@Override
123-
protected void calculateUiRootPath(SwaggerUiConfigParameters swaggerUiConfigParameters,StringBuilder... sbUrls) {
110+
protected void calculateUiRootPath(SwaggerUiConfigParameters swaggerUiConfigParameters, StringBuilder... sbUrls) {
124111
StringBuilder sbUrl = new StringBuilder();
125112
sbUrl.append(webEndpointProperties.getBasePath());
126-
calculateUiRootCommon(swaggerUiConfigParameters,sbUrl, sbUrls);
127-
}
128-
129-
@Override
130-
protected void calculateOauth2RedirectUrl(SwaggerUiConfigParameters swaggerUiConfigParameters, UriComponentsBuilder uriComponentsBuilder) {
131-
if (StringUtils.isBlank(swaggerUiConfig.getOauth2RedirectUrl()) || !swaggerUiConfigParameters.isValidUrl(swaggerUiConfig.getOauth2RedirectUrl())) {
132-
UriComponentsBuilder oauthPrefix = uriComponentsBuilder.path(managementServerProperties.getBasePath() + swaggerUiConfigParameters.getUiRootPath()).path(webJarsPrefixUrl);
133-
swaggerUiConfigParameters.setOauth2RedirectUrl(oauthPrefix.path(getOauth2RedirectUrl()).build().toString());
134-
}
113+
calculateUiRootCommon(swaggerUiConfigParameters, sbUrl, sbUrls);
135114
}
136115

137116
@Override
138117
protected void buildApiDocUrl(SwaggerUiConfigParameters swaggerUiConfigParameters) {
139-
swaggerUiConfigParameters.setApiDocsUrl( buildUrl(swaggerUiConfigParameters.getContextPath() + webEndpointProperties.getBasePath(), DEFAULT_API_DOCS_ACTUATOR_URL));
118+
swaggerUiConfigParameters.setApiDocsUrl(buildUrl(swaggerUiConfigParameters.getContextPath() + webEndpointProperties.getBasePath(), DEFAULT_API_DOCS_ACTUATOR_URL));
140119
}
141120

142121
@Override

springdoc-openapi-starter-webflux-ui/src/main/java/org/springdoc/webflux/ui/SwaggerWelcomeCommon.java

+35-11
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,15 @@
2121
* * * *
2222
* * *
2323
* *
24-
*
24+
*
2525
*/
2626

2727
package org.springdoc.webflux.ui;
2828

2929
import java.net.URI;
3030
import java.util.Map;
3131

32+
import org.apache.commons.lang3.StringUtils;
3233
import org.springdoc.core.properties.SpringDocConfigProperties;
3334
import org.springdoc.core.properties.SwaggerUiConfigParameters;
3435
import org.springdoc.core.properties.SwaggerUiConfigProperties;
@@ -38,21 +39,17 @@
3839
import org.springframework.http.HttpStatus;
3940
import org.springframework.http.server.reactive.ServerHttpRequest;
4041
import org.springframework.http.server.reactive.ServerHttpResponse;
41-
import org.springframework.util.AntPathMatcher;
4242
import org.springframework.web.util.UriComponentsBuilder;
4343

44+
import static org.springdoc.core.utils.Constants.DEFAULT_WEB_JARS_PREFIX_URL;
45+
4446
/**
4547
* The type Swagger welcome common.
4648
*
4749
* @author bnasslashen
4850
*/
4951
public abstract class SwaggerWelcomeCommon extends AbstractSwaggerWelcome {
5052

51-
/**
52-
* The Web jars prefix url.
53-
*/
54-
protected String webJarsPrefixUrl;
55-
5653

5754
/**
5855
* Instantiates a new Abstract swagger welcome.
@@ -62,7 +59,6 @@ public abstract class SwaggerWelcomeCommon extends AbstractSwaggerWelcome {
6259
*/
6360
protected SwaggerWelcomeCommon(SwaggerUiConfigProperties swaggerUiConfig, SpringDocConfigProperties springDocConfigProperties) {
6461
super(swaggerUiConfig, springDocConfigProperties);
65-
this.webJarsPrefixUrl = springDocConfigProperties.getWebjars().getPrefix();
6662
}
6763

6864
/**
@@ -74,14 +70,37 @@ protected SwaggerWelcomeCommon(SwaggerUiConfigProperties swaggerUiConfig, Spring
7470
*/
7571
protected Mono<Void> redirectToUi(ServerHttpRequest request, ServerHttpResponse response) {
7672
SwaggerUiConfigParameters swaggerUiConfigParameters = new SwaggerUiConfigParameters(swaggerUiConfig);
77-
this.buildFromCurrentContextPath(swaggerUiConfigParameters, request);
78-
String sbUrl = this.buildUrl(swaggerUiConfigParameters.getContextPath(), swaggerUiConfigParameters.getUiRootPath() + springDocConfigProperties.getWebjars().getPrefix() + getSwaggerUiUrl());
73+
buildFromCurrentContextPath(swaggerUiConfigParameters, request);
74+
String webjarsPrefix = springDocConfigProperties.getWebjars().getPrefix();
75+
String additionalPrefix = DEFAULT_WEB_JARS_PREFIX_URL.equals(webjarsPrefix) ? "" : webjarsPrefix;
76+
String sbUrl = swaggerUiConfigParameters.getContextPath()
77+
+ swaggerUiConfigParameters.getUiRootPath()
78+
+ additionalPrefix
79+
+ getSwaggerUiUrl();
7980
UriComponentsBuilder uriBuilder = getUriComponentsBuilder(swaggerUiConfigParameters, sbUrl);
81+
// forward all queryParams from original request
82+
request.getQueryParams().forEach(uriBuilder::queryParam);
8083
response.setStatusCode(HttpStatus.FOUND);
8184
response.getHeaders().setLocation(URI.create(uriBuilder.build().encode().toString()));
8285
return response.setComplete();
8386
}
8487

88+
@Override
89+
protected void calculateOauth2RedirectUrl(SwaggerUiConfigParameters swaggerUiConfigParameters, UriComponentsBuilder uriComponentsBuilder) {
90+
if (StringUtils.isBlank(swaggerUiConfig.getOauth2RedirectUrl()) || !swaggerUiConfigParameters.isValidUrl(swaggerUiConfig.getOauth2RedirectUrl())) {
91+
String webjarsPrefix = springDocConfigProperties.getWebjars().getPrefix();
92+
String additionalPath = DEFAULT_WEB_JARS_PREFIX_URL.equals(webjarsPrefix) ? "" : webjarsPrefix;
93+
swaggerUiConfigParameters.setOauth2RedirectUrl(
94+
uriComponentsBuilder
95+
.path(swaggerUiConfigParameters.getUiRootPath())
96+
.path(additionalPath)
97+
.path(getOauth2RedirectUrl())
98+
.build()
99+
.toString()
100+
);
101+
}
102+
}
103+
85104
/**
86105
* Gets swagger ui config.
87106
*
@@ -105,8 +124,13 @@ void buildFromCurrentContextPath(SwaggerUiConfigParameters swaggerUiConfigParame
105124
super.init(swaggerUiConfigParameters);
106125
swaggerUiConfigParameters.setContextPath(request.getPath().contextPath().value());
107126
String url = UriComponentsBuilder.fromHttpRequest(request).toUriString();
108-
if (!AntPathMatcher.DEFAULT_PATH_SEPARATOR.equals(request.getPath().toString()))
127+
String target = UriComponentsBuilder.fromPath(request.getPath().contextPath().value()).toUriString();
128+
int endIndex = url.indexOf(target) + target.length();
129+
if (endIndex > 0) {
130+
url = url.substring(0, endIndex);
131+
} else {
109132
url = url.replace(request.getPath().toString(), "");
133+
}
110134
buildConfigUrl(swaggerUiConfigParameters, UriComponentsBuilder.fromUriString(url));
111135
}
112136

springdoc-openapi-starter-webflux-ui/src/main/java/org/springdoc/webflux/ui/SwaggerWelcomeWebFlux.java

+6-13
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,15 @@
2727
package org.springdoc.webflux.ui;
2828

2929
import io.swagger.v3.oas.annotations.Operation;
30-
import org.apache.commons.lang3.StringUtils;
3130
import org.springdoc.core.properties.SpringDocConfigProperties;
3231
import org.springdoc.core.properties.SwaggerUiConfigParameters;
3332
import org.springdoc.core.properties.SwaggerUiConfigProperties;
3433
import org.springdoc.core.providers.SpringWebProvider;
35-
import reactor.core.publisher.Mono;
36-
3734
import org.springframework.http.server.reactive.ServerHttpRequest;
3835
import org.springframework.http.server.reactive.ServerHttpResponse;
3936
import org.springframework.stereotype.Controller;
4037
import org.springframework.web.bind.annotation.GetMapping;
41-
import org.springframework.web.util.UriComponentsBuilder;
38+
import reactor.core.publisher.Mono;
4239

4340
import static org.springdoc.core.utils.Constants.SWAGGER_CONFIG_FILE;
4441
import static org.springdoc.core.utils.Constants.SWAGGER_UI_PATH;
@@ -90,14 +87,6 @@ protected void calculateUiRootPath(SwaggerUiConfigParameters swaggerUiConfigPara
9087
calculateUiRootCommon(swaggerUiConfigParameters,sbUrl, sbUrls);
9188
}
9289

93-
@Override
94-
protected void calculateOauth2RedirectUrl(SwaggerUiConfigParameters swaggerUiConfigParameters, UriComponentsBuilder uriComponentsBuilder) {
95-
if (StringUtils.isBlank(swaggerUiConfig.getOauth2RedirectUrl()) || !swaggerUiConfigParameters.isValidUrl(swaggerUiConfig.getOauth2RedirectUrl())) {
96-
UriComponentsBuilder oauthPrefix = uriComponentsBuilder.path(swaggerUiConfigParameters.getContextPath()).path(swaggerUiConfigParameters.getUiRootPath()).path(webJarsPrefixUrl);
97-
swaggerUiConfigParameters.setOauth2RedirectUrl(oauthPrefix.path(getOauth2RedirectUrl()).build().toString());
98-
}
99-
}
100-
10190
@Override
10291
protected void buildApiDocUrl(SwaggerUiConfigParameters swaggerUiConfigParameters) {
10392
swaggerUiConfigParameters.setApiDocsUrl(buildUrlWithContextPath(swaggerUiConfigParameters, springDocConfigProperties.getApiDocs().getPath()));
@@ -107,7 +96,11 @@ protected void buildApiDocUrl(SwaggerUiConfigParameters swaggerUiConfigParameter
10796
protected String buildUrlWithContextPath(SwaggerUiConfigParameters swaggerUiConfigParameters, String swaggerUiUrl) {
10897
if (swaggerUiConfigParameters.getPathPrefix() == null)
10998
swaggerUiConfigParameters.setPathPrefix(springWebProvider.findPathPrefix(springDocConfigProperties));
110-
return buildUrl(swaggerUiConfigParameters.getContextPath() + swaggerUiConfigParameters.getPathPrefix(), swaggerUiUrl);
99+
if (swaggerUiUrl.startsWith(swaggerUiConfigParameters.getPathPrefix())) {
100+
return buildUrl(swaggerUiConfigParameters.getContextPath(), swaggerUiUrl);
101+
} else {
102+
return buildUrl(swaggerUiConfigParameters.getContextPath() + swaggerUiConfigParameters.getPathPrefix(), swaggerUiUrl);
103+
}
111104
}
112105

113106
@Override

springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/AbstractSpringDocTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
SwaggerConfig.class, SwaggerUiOAuthProperties.class, SpringDocUIConfiguration.class })
4545
public abstract class AbstractSpringDocTest extends AbstractCommonTest {
4646

47-
private static final String DEFAULT_SWAGGER_INITIALIZER_URL = Constants.DEFAULT_WEB_JARS_PREFIX_URL + Constants.SWAGGER_INITIALIZER_URL;
47+
private static final String DEFAULT_SWAGGER_INITIALIZER_URL = Constants.SWAGGER_INITIALIZER_URL;
4848

4949
@Autowired
5050
protected WebTestClient webTestClient;

springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app1/SpringDocApp1RedirecFilterTest.java

+2-3
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,10 @@
2020

2121
import org.hamcrest.Matchers;
2222
import org.junit.jupiter.api.Test;
23-
import test.org.springdoc.ui.AbstractSpringDocTest;
24-
2523
import org.springframework.boot.autoconfigure.SpringBootApplication;
2624
import org.springframework.test.context.TestPropertySource;
2725
import org.springframework.test.web.reactive.server.WebTestClient;
26+
import test.org.springdoc.ui.AbstractSpringDocTest;
2827

2928

3029
@TestPropertySource(properties = "springdoc.swagger-ui.filter=false")
@@ -36,7 +35,7 @@ void shouldRedirectWithConfigUrlIgnoringQueryParams() {
3635
WebTestClient.ResponseSpec responseSpec = webTestClient.get().uri("/swagger-ui.html").exchange()
3736
.expectStatus().isFound();
3837
responseSpec.expectHeader()
39-
.value("Location", Matchers.is("/webjars/swagger-ui/index.html"));
38+
.value("Location", Matchers.is("/swagger-ui/index.html"));
4039
super.checkJS("index1-filter");
4140
}
4241

springdoc-openapi-starter-webflux-ui/src/test/java/test/org/springdoc/ui/app1/SpringDocApp1RedirectConfigUrlTest.java

+2-3
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,10 @@
2020

2121
import org.hamcrest.Matchers;
2222
import org.junit.jupiter.api.Test;
23-
import test.org.springdoc.ui.AbstractSpringDocTest;
24-
2523
import org.springframework.boot.autoconfigure.SpringBootApplication;
2624
import org.springframework.test.context.TestPropertySource;
2725
import org.springframework.test.web.reactive.server.WebTestClient;
26+
import test.org.springdoc.ui.AbstractSpringDocTest;
2827

2928

3029
@TestPropertySource(properties = {
@@ -39,7 +38,7 @@ void shouldRedirectWithConfigUrlIgnoringQueryParams() {
3938
WebTestClient.ResponseSpec responseSpec = webTestClient.get().uri("/swagger-ui.html").exchange()
4039
.expectStatus().isFound();
4140
responseSpec.expectHeader()
42-
.value("Location", Matchers.is("/webjars/swagger-ui/index.html"));
41+
.value("Location", Matchers.is("/swagger-ui/index.html"));
4342

4443
super.checkJS("index1-configurl");
4544
}

0 commit comments

Comments
 (0)