I am using Swagger for Jersey2 according to this tutorial: https://github.com/swagger-api/swagger-core/wiki/Swagger-Core-Jersey-2.X-Project-Setup-1.5 with custom Application class. In order for Swagger to initialize properly, an override of getClasses() needs to be implemented.
Unfortunately this also means that I must manually add every single class from my resources to the HashSet. If I don't do that all endpoints return 404. But when I am not using Swagger I don't have to override the method and all my REST resources are automatically discovered by JAX-RS annotations.
Is there a way to register Swagger classes but at the same time retain automatic discovery for my personal resources?