Hi all,
I think I may have found a potential bug in the Swagger2Feature.java file
caused by the removal and subsequent changes made with regards to removing the
if ( !isScan() ) check at the beginning of the addSwaggerResource
implementation.
Previously, the appInfo object was only populated when isScan() returned false.
When true, appInfo is null. Now, since that check has been removed and the
logic extrapolated outwards, appInfo is never null (it’s instantiated as an
object on line 147).
This causes the subsequent code (line 196):
BeanConfig beanConfig = appInfo == null
? new BeanConfig()
: new ApplicationBeanConfig(appInfo.getProvider());
…to always instantiate an ApplicationBeanConfig object. Our production code
relied on the BeanConfig’s implementation of its classes() method to grab our
ReaderListener classes annotated with @SwaggerDefinition. Because a BeanConfig
will never be instantiated this way anymore, we would no longer be able to use
our current implementations of the ReaderListener interface.
Is this a known bug, or is there a workaround that I’m missing?
Best regards,
Taylor Burke
NCR Corporation
803.215.9179
[email protected]