A point of view – not a solution
The mechanism described in http://prabhukvn.com/2016/02/24/swagger-documentation-for-servlet/ works with any java web application as long as all the project class files reside in WEB-INF/classes. But this is not the case with ATG. ATG will read all class files from atglib, hence
Approach 1: Rewrite the Package scanner class so that it will scan the java packages listed in atglib. This package scanner class will be used by swagger servlet to scan classes for swagger specific annotations.
Approach 2: Use the same class loader in above package scanner component which is used by nucleus in ATG.