File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
springdoc-openapi-starter-common/src/main/java/org/springdoc/ui Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -135,6 +135,16 @@ protected String overwriteSwaggerDefaultUrl(String html) {
135135 return html .replace (Constants .SWAGGER_UI_DEFAULT_URL , StringUtils .EMPTY );
136136 }
137137
138+ /**
139+ * Setting the url configured with swagger ui properties
140+ *
141+ * @param html
142+ * @return modifed html
143+ */
144+ protected String setConfiguredApiDocsUrl (String html ){
145+ return html .replace (Constants .SWAGGER_UI_DEFAULT_URL , swaggerUiConfig .getUrl ());
146+ }
147+
138148 /**
139149 * Default transformations string.
140150 *
@@ -167,6 +177,10 @@ else if (swaggerUiConfig.getCsrf().isUseSessionStorage())
167177 if (swaggerUiConfig .isDisableSwaggerDefaultUrl ())
168178 html = overwriteSwaggerDefaultUrl (html );
169179
180+ if (StringUtils .isNotEmpty (swaggerUiConfig .getUrl ())){
181+ html = setConfiguredApiDocsUrl (html );
182+ }
183+
170184 return html ;
171185 }
172186
You can’t perform that action at this time.
0 commit comments