Reformatted
(1773)
@@ -48,10 +48,12 @@ import java.util.Optional;
import java.util.Set;
import java.util.function.Predicate;
import java.util.stream.Stream;
-import java.util.stream.StreamSupport;
-import static java.util.Optional.*;
+import static java.util.Optional.empty;
+import static java.util.Optional.of;
import static java.util.stream.Collectors.*;
+import static java.util.stream.Stream.*;
+import static java.util.stream.StreamSupport.*;
import static springfox.documentation.builders.BuilderDefaults.*;
import static springfox.documentation.spi.service.contexts.Orderings.*;
import static springfox.documentation.spring.web.scanners.ResourceGroups.*;
@@ -95,7 +97,9 @@ public class ApiListingScanner {
commons.add(word);
}
}
- return of("/" + String.join("/", commons.stream().filter(Objects::nonNull).collect(toList())));
+ return of("/" + String.join("/", commons.stream()
+ .filter(Objects::nonNull)
+ .collect(toList())));
}
static List<String> urlParts(ApiDescription apiDescription) {
@@ -112,7 +116,11 @@ public class ApiListingScanner {
Map<ResourceGroup, List<RequestMappingContext>> requestMappingsByResourceGroup
= context.getRequestMappingsByResourceGroup();
Collection<ApiDescription> additionalListings = pluginsManager.additionalListings(context);
- Set<ResourceGroup> allResourceGroups = Stream.concat(StreamSupport.stream(collectResourceGroups(additionalListings).spliterator(), false),
+ Set<ResourceGroup> allResourceGroups =
+ concat(
+ stream(
+ collectResourceGroups(additionalListings).spliterator(),
+ false),
requestMappingsByResourceGroup.keySet().stream())
.collect(toSet());
@@ -127,7 +135,9 @@ public class ApiListingScanner {
Set<ApiDescription> apiDescriptions = new HashSet<>();
Map<String, Model> models = new LinkedHashMap<String, Model>();
- List<RequestMappingContext> requestMappings = nullToEmptyList(requestMappingsByResourceGroup.get(resourceGroup));
+ List<RequestMappingContext> requestMappings =
+ nullToEmptyList(requestMappingsByResourceGroup.get(resourceGroup));
+
for (RequestMappingContext each : sortedByMethods(requestMappings)) {
models.putAll(apiModelReader.read(each.withKnownModels(models)));
apiDescriptions.addAll(apiDescriptionReader.read(each));
@@ -135,8 +145,8 @@ public class ApiListingScanner {
List<ApiDescription> additional = additionalListings.stream()
.filter(
- belongsTo(resourceGroup.getGroupName()).and(
- onlySelectedApis(documentationContext)))
+ belongsTo(resourceGroup.getGroupName())
+ .and(onlySelectedApis(documentationContext)))
.collect(toList());
apiDescriptions.addAll(additional);
@@ -145,7 +155,8 @@ public class ApiListingScanner {
String resourcePath = new ResourcePathProvider(resourceGroup)
.resourcePath()
- .orElse(longestCommonPath(sortedApis)
+ .orElse(
+ longestCommonPath(sortedApis)
.orElse(null));
PathAdjuster adjuster = new PathMappingAdjuster(documentationContext);
