Skip to content

Commit 8233e80

Browse files
committed
Swagger-UI Property persistAuthorization is missing. Fixes #938
1 parent fc6d124 commit 8233e80

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

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,29 @@ public abstract class AbstractSwaggerUiConfigProperties {
159159
*/
160160
protected SyntaxHighlight syntaxHighlight = new SyntaxHighlight();
161161

162+
/**
163+
* The Persist authorization.
164+
*/
165+
protected Boolean persistAuthorization;
166+
167+
/**
168+
* Gets persist authorization.
169+
*
170+
* @return the persist authorization
171+
*/
172+
public Boolean getPersistAuthorization() {
173+
return persistAuthorization;
174+
}
175+
176+
/**
177+
* Sets persist authorization.
178+
*
179+
* @param persistAuthorization the persist authorization
180+
*/
181+
public void setPersistAuthorization(Boolean persistAuthorization) {
182+
this.persistAuthorization = persistAuthorization;
183+
}
184+
162185
/**
163186
* Gets syntax highlight.
164187
*

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ public SwaggerUiConfigParameters(SwaggerUiConfigProperties swaggerUiConfig) {
117117
this.urlsPrimaryName = swaggerUiConfig.getUrlsPrimaryName();
118118
this.groupsOrder = swaggerUiConfig.getGroupsOrder();
119119
this.syntaxHighlight = swaggerUiConfig.getSyntaxHighlight();
120+
this.persistAuthorization = swaggerUiConfig.getPersistAuthorization();
120121
}
121122

122123
/**
@@ -205,6 +206,7 @@ public Map<String, Object> getConfigParameters() {
205206
SpringDocPropertiesUtils.put("url", url, params);
206207
put(URLS_PROPERTY, urls, params);
207208
SpringDocPropertiesUtils.put("urls.primaryName", urlsPrimaryName, params);
209+
SpringDocPropertiesUtils.put("persistAuthorization", persistAuthorization, params);
208210
return params;
209211
}
210212

0 commit comments

Comments
 (0)