swagger-core
swagger-core copied to clipboard
Useless parameter shouldScan in setScan(boolean shouldScan) method inside swagger-jaxrs BeanConfig
shouldScan method parameter does nothing inside setScan(boolean shouldScan) swagger-jaxrs BeanConfig.java
public void setScan(boolean shouldScan) {
scanAndRead();
new SwaggerContextService()
.withConfigId(configId)
.withScannerId(scannerId)
.withContextId(contextId)
.withServletConfig(servletConfig)
.withSwaggerConfig(this)
.withScanner(this)
.withBasePath(getBasePath())
.withPathBasedConfig(isUsePathBasedConfig())
.initConfig()
.initScanner();
}
https://github.com/swagger-api/swagger-core/blob/v1.6.4/modules/swagger-jaxrs/src/main/java/io/swagger/jaxrs/config/BeanConfig.java
When working with a library, the user of the library thinks that by passing a variable as an argument, he can enable or disable scanning. But in the current version, scanning is enabled for any value of the argument.