Skip to content

Commit 264ec00

Browse files
committed
Add configuration flag for tryItOutEnabled
1 parent 1346f01 commit 264ec00

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

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

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,11 +159,32 @@ public abstract class AbstractSwaggerUiConfigProperties {
159159
*/
160160
protected SyntaxHighlight syntaxHighlight;
161161

162+
/**
163+
* Try it out enabled
164+
*/
165+
protected Boolean tryItOutEnabled;
166+
162167
/**
163168
* The Persist authorization.
164169
*/
165170
protected Boolean persistAuthorization;
166171

172+
/**
173+
* Gets try it out enabled
174+
* @return try it out enabled
175+
*/
176+
public Boolean getTryItOutEnabled() {
177+
return tryItOutEnabled;
178+
}
179+
180+
/**
181+
* Sets try it out enabled
182+
* @param tryItOutEnabled try it out enabled
183+
*/
184+
public void setTryItOutEnabled(Boolean tryItOutEnabled) {
185+
this.tryItOutEnabled = tryItOutEnabled;
186+
}
187+
167188
/**
168189
* Gets persist authorization.
169190
*

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.tryItOutEnabled = swaggerUiConfig.getTryItOutEnabled();
120121
this.persistAuthorization = swaggerUiConfig.getPersistAuthorization();
121122
}
122123

@@ -206,6 +207,7 @@ public Map<String, Object> getConfigParameters() {
206207
SpringDocPropertiesUtils.put("url", url, params);
207208
put(URLS_PROPERTY, urls, params);
208209
SpringDocPropertiesUtils.put("urls.primaryName", urlsPrimaryName, params);
210+
SpringDocPropertiesUtils.put("tryItOutEnabled", tryItOutEnabled, params);
209211
SpringDocPropertiesUtils.put("persistAuthorization", persistAuthorization, params);
210212
return params;
211213
}

0 commit comments

Comments
 (0)