Swagger looks for the 'PACKAGES' key for determining the set of packages that need to be included as part of the scanning process. If no value has been specified, then it makes a rudimentary search to determine the base package that needs to be included.
The implications of the default behavior are:
- REST resources are scanned within WEB-INF/classes only.
- Classes added to library jar files that belong to a different packages are not included.
In most cases, this is not really problem as people quickly learn to configure the 'PACKAGES' parameter in the `swagger.swarm.conf` file. From a product perspective, it would be nice to include a more sensible default.
The definition of 'sensible default' is debatable and hence needs a discussion to confirm if this behavior makes sense or not. If it makes sense, then I would be happy to provide a fix that leverages IndexView for defining the default values.