Skip to content

Commit 63d43a1

Browse files
committed
Support swagger-ui.withCredentials property. Fixes #1505.
1 parent d011460 commit 63d43a1

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

springdoc-openapi-common/src/main/java/org/springdoc/core/AbstractSwaggerUiConfigProperties.java

+23
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,29 @@ public abstract class AbstractSwaggerUiConfigProperties {
169169
*/
170170
protected Boolean queryConfigEnabled;
171171

172+
/**
173+
* The With credentials.
174+
*/
175+
protected Boolean withCredentials;
176+
177+
/**
178+
* Gets with credentials.
179+
*
180+
* @return the with credentials
181+
*/
182+
public Boolean getWithCredentials() {
183+
return withCredentials;
184+
}
185+
186+
/**
187+
* Sets with credentials.
188+
*
189+
* @param withCredentials the with credentials
190+
*/
191+
public void setWithCredentials(Boolean withCredentials) {
192+
this.withCredentials = withCredentials;
193+
}
194+
172195
/**
173196
* Gets query config enabled.
174197
*

springdoc-openapi-common/src/main/java/org/springdoc/core/SwaggerUiConfigParameters.java

+2
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ public SwaggerUiConfigParameters(SwaggerUiConfigProperties swaggerUiConfig) {
135135
this.tryItOutEnabled = swaggerUiConfig.getTryItOutEnabled();
136136
this.persistAuthorization = swaggerUiConfig.getPersistAuthorization();
137137
this.queryConfigEnabled = swaggerUiConfig.getQueryConfigEnabled();
138+
this.withCredentials=swaggerUiConfig.getWithCredentials();
138139
}
139140

140141
/**
@@ -227,6 +228,7 @@ public Map<String, Object> getConfigParameters() {
227228
SpringDocPropertiesUtils.put("tryItOutEnabled", tryItOutEnabled, params);
228229
SpringDocPropertiesUtils.put("persistAuthorization", persistAuthorization, params);
229230
SpringDocPropertiesUtils.put(FILTER_PROPERTY, filter, params);
231+
SpringDocPropertiesUtils.put("withCredentials", withCredentials, params);
230232
return params;
231233
}
232234

0 commit comments

Comments
 (0)