Remove per-export proxy selection
This commit is contained in:
+27
-12
@@ -9,8 +9,7 @@ public record ApiDocExportRequest(
|
||||
List<String> projectPaths,
|
||||
boolean onlyInterfaces,
|
||||
boolean facadeNamesOnly,
|
||||
boolean apiPackagesOnly,
|
||||
boolean debugProxyEnabled) {
|
||||
boolean apiPackagesOnly) {
|
||||
|
||||
public enum Mode {
|
||||
PATH, FQN, BATCH
|
||||
@@ -30,29 +29,45 @@ public record ApiDocExportRequest(
|
||||
}
|
||||
}
|
||||
|
||||
public static ApiDocExportRequest path(
|
||||
String path, boolean debugProxyEnabled) {
|
||||
public static ApiDocExportRequest path(String path) {
|
||||
return new ApiDocExportRequest(
|
||||
Mode.PATH, path, List.of(),
|
||||
false, false, false, debugProxyEnabled);
|
||||
false, false, false);
|
||||
}
|
||||
|
||||
public static ApiDocExportRequest fqn(
|
||||
String className, boolean debugProxyEnabled) {
|
||||
@Deprecated
|
||||
public static ApiDocExportRequest path(String path, boolean ignored) {
|
||||
return path(path);
|
||||
}
|
||||
|
||||
public static ApiDocExportRequest fqn(String className) {
|
||||
return new ApiDocExportRequest(
|
||||
Mode.FQN, className, List.of(),
|
||||
false, false, false, debugProxyEnabled);
|
||||
false, false, false);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static ApiDocExportRequest fqn(String className, boolean ignored) {
|
||||
return fqn(className);
|
||||
}
|
||||
|
||||
public static ApiDocExportRequest batch(
|
||||
List<String> projectPaths,
|
||||
boolean onlyInterfaces,
|
||||
boolean facadeNamesOnly,
|
||||
boolean apiPackagesOnly,
|
||||
boolean debugProxyEnabled) {
|
||||
boolean apiPackagesOnly) {
|
||||
return new ApiDocExportRequest(
|
||||
Mode.BATCH, "", projectPaths,
|
||||
onlyInterfaces, facadeNamesOnly, apiPackagesOnly,
|
||||
debugProxyEnabled);
|
||||
onlyInterfaces, facadeNamesOnly, apiPackagesOnly);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static ApiDocExportRequest batch(
|
||||
List<String> projectPaths,
|
||||
boolean onlyInterfaces,
|
||||
boolean facadeNamesOnly,
|
||||
boolean apiPackagesOnly,
|
||||
boolean ignored) {
|
||||
return batch(projectPaths, onlyInterfaces, facadeNamesOnly, apiPackagesOnly);
|
||||
}
|
||||
}
|
||||
|
||||
+2
-3
@@ -33,9 +33,8 @@ public final class RunApiDocExportUseCase {
|
||||
OperationContext context) throws Exception {
|
||||
Objects.requireNonNull(request, "request");
|
||||
Objects.requireNonNull(context, "context");
|
||||
String endpoint = request.debugProxyEnabled()
|
||||
? Objects.requireNonNullElse(debugEndpointSupplier.get(), "")
|
||||
: "";
|
||||
String endpoint = Objects.requireNonNullElse(
|
||||
debugEndpointSupplier.get(), "");
|
||||
exporter.export(request, endpoint, context);
|
||||
return new Result(true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user