Skip to content

Commit f70f809

Browse files
authored
Merge pull request #3296 from vincentmigot/1.5
Add possibility to NOT expand super types while using setScan
2 parents 2dde325 + 439825f commit f70f809

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

modules/swagger-jaxrs/src/main/java/io/swagger/jaxrs/config/BeanConfig.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ public class BeanConfig extends AbstractScanner implements Scanner, SwaggerConfi
5858
String configId;
5959
String contextId;
6060

61+
boolean expandSuperTypes = true;
62+
6163
private boolean usePathBasedConfig = false;
6264

6365
public boolean isUsePathBasedConfig() {
@@ -197,6 +199,14 @@ public String getBasePath() {
197199
return basePath;
198200
}
199201

202+
public boolean getExpandSuperTypes() {
203+
return expandSuperTypes;
204+
}
205+
206+
public void setExpandSuperTypes(boolean expandSuperTypes) {
207+
this.expandSuperTypes = expandSuperTypes;
208+
}
209+
200210
public void setBasePath(String basePath) {
201211
if (!"".equals(basePath) && basePath != null) {
202212
if (!basePath.startsWith("/")) {
@@ -271,6 +281,8 @@ public Set<Class<?>> classes() {
271281
allowAllPackages = true;
272282
}
273283

284+
config.setExpandSuperTypes(getExpandSuperTypes());
285+
274286
config.setScanners(new ResourcesScanner(), new TypeAnnotationsScanner(), new SubTypesScanner());
275287

276288
final Reflections reflections = new Reflections(config);

0 commit comments

Comments
 (0)