I'm running 2 REST APIs in the same JVM on different ports. They both use Swagger. When calling BeanConfig.scan(true), the ScannerFactory instance is set to the BeanConfig instance making the call. The result is that the second call to this is the one that "wins".
ScannerFactory shouldn't be using a singleton static model. This is a perfect example of the unintended side effect that can occur when an object model leverages static.
As a workaround, I've tried setting up the BeanConfig to scan the packages from both apps. All of the API calls show up in the Swagger UI correctly, but because it's on the wrong port sample calls cannot be made.
EDIT: To clarify, this is part of the swagger-jaxrs packaging