Skip to content

Commit 3de8412

Browse files
committed
Changes report: Support swagger-ui.withCredentials property. Fixes #1505.
1 parent a8a50d5 commit 3de8412

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed

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

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,29 @@ public abstract class AbstractSwaggerUiConfigProperties {
171171
*/
172172
protected Boolean queryConfigEnabled;
173173

174+
/**
175+
* The With credentials.
176+
*/
177+
protected Boolean withCredentials;
178+
179+
/**
180+
* Gets with credentials.
181+
*
182+
* @return the with credentials
183+
*/
184+
public Boolean getWithCredentials() {
185+
return withCredentials;
186+
}
187+
188+
/**
189+
* Sets with credentials.
190+
*
191+
* @param withCredentials the with credentials
192+
*/
193+
public void setWithCredentials(Boolean withCredentials) {
194+
this.withCredentials = withCredentials;
195+
}
196+
174197
/**
175198
* Gets query config enabled.
176199
*
@@ -744,7 +767,7 @@ public String toString() {
744767
/**
745768
* The enum Direction.
746769
*/
747-
public enum Direction {
770+
enum Direction {
748771
/**
749772
*Asc direction.
750773
*/

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ public SwaggerUiConfigParameters(SwaggerUiConfigProperties swaggerUiConfig) {
140140
this.tryItOutEnabled = swaggerUiConfig.getTryItOutEnabled();
141141
this.persistAuthorization = swaggerUiConfig.getPersistAuthorization();
142142
this.queryConfigEnabled = swaggerUiConfig.getQueryConfigEnabled();
143+
this.withCredentials=swaggerUiConfig.getWithCredentials();
143144
}
144145

145146
/**
@@ -232,6 +233,7 @@ public Map<String, Object> getConfigParameters() {
232233
SpringDocPropertiesUtils.put("tryItOutEnabled", tryItOutEnabled, params);
233234
SpringDocPropertiesUtils.put("persistAuthorization", persistAuthorization, params);
234235
SpringDocPropertiesUtils.put(FILTER_PROPERTY, filter, params);
236+
SpringDocPropertiesUtils.put("withCredentials", withCredentials, params);
235237
return params;
236238
}
237239

0 commit comments

Comments
 (0)