fix optional class
@@ -98,7 +98,8 @@ public class ApiListingScanner {
Collections.sort(sortedApis, documentationContext.getApiDescriptionOrdering());
String resourcePath = longestCommonPath(sortedApis);
- if (resourceGroup.getControllerClass().isAnnotationPresent(RequestMapping.class)) {
+ if (resourceGroup.getControllerClass().isPresent()) {
+ if (resourceGroup.getControllerClass().get().isAnnotationPresent(RequestMapping.class)) {
// determine resourcePath from @RequestMapping annotation if exists
RequestMapping requestMappingAnnotation = (RequestMapping) resourceGroup.getControllerClass().getAnnotation(RequestMapping.class);
String[] paths = requestMappingAnnotation.path();
@@ -106,6 +107,7 @@ public class ApiListingScanner {
resourcePath = paths[0];
}
}
+ }
PathProvider pathProvider = documentationContext.getPathProvider();
String basePath = pathProvider.getApplicationBasePath();
