fixed URL endpoint
This commit is contained in:
parent
59b0cde730
commit
2ee8bf8010
@ -68,13 +68,12 @@ public class ExportApisToWso2FromV32 extends AbstractProcess {
|
||||
int maxThreads = config.getMaxThreads();
|
||||
// ExecutorService executor = Executors.newFixedThreadPool(maxThreads);
|
||||
|
||||
// AutosweepIntegrationPPE/AutosweepIntegrationPPE/v1
|
||||
int skipCount = 31;
|
||||
int skipCount = 722;
|
||||
|
||||
for (SearchedArtifact api : sortedArtifacts) {
|
||||
for (SearchedArtifact api : sortedArtifacts) {
|
||||
final int index = apiCounter.getAndIncrement();
|
||||
if (index <= skipCount) {
|
||||
log.info("Skipping API {} of {}: {}", index, apis.getCount(), api.getName());
|
||||
log.info("Skipping API {} of {}: {}", index, apis.getCount(), api.getId());
|
||||
continue;
|
||||
}
|
||||
// executor.submit(() -> processApi(api, token, index, apis.getCount()));
|
||||
@ -321,6 +320,7 @@ public class ExportApisToWso2FromV32 extends AbstractProcess {
|
||||
data.setApplicableFlows(new ArrayList<>());
|
||||
data.getApplicableFlows().add("request");
|
||||
data.getApplicableFlows().add("response");
|
||||
data.getApplicableFlows().add("fault");
|
||||
data.setSupportedGateways(new ArrayList<>());
|
||||
data.getSupportedGateways().add("Synapse");
|
||||
data.setSupportedApiTypes(new ArrayList<>());
|
||||
|
||||
@ -195,15 +195,15 @@ public class ApiDefinitionMapper32to45 {
|
||||
}
|
||||
}
|
||||
if (endpointProd != null && endpointProd.containsKey("url") && endpointProd.get("url") != null) {
|
||||
String url = endpointProd.get("url").toString();
|
||||
String url = endpointProd.get("url").toString().trim().replaceAll("\\p{Cf}", "");
|
||||
try {
|
||||
URL u = new URL(url);
|
||||
} catch (Exception e) {
|
||||
url = url.replaceAll("\\{\\{.*?\\}\\}", "");
|
||||
if (!url.startsWith("http"))
|
||||
url = "http://" + url;
|
||||
endpointProd.put("url", url);
|
||||
}
|
||||
endpointProd.put("url", url);
|
||||
}
|
||||
}
|
||||
|
||||
@ -217,15 +217,15 @@ public class ApiDefinitionMapper32to45 {
|
||||
}
|
||||
}
|
||||
if (endpointSand != null && endpointSand.containsKey("url") && endpointSand.get("url") != null) {
|
||||
String url = endpointSand.get("url").toString();
|
||||
String url = endpointSand.get("url").toString().trim().replaceAll("\\p{Cf}", "");
|
||||
try {
|
||||
URL u = new URL(url);
|
||||
} catch (Exception e) {
|
||||
url = url.replaceAll("\\{\\{.*?\\}\\}", "");
|
||||
if (!url.startsWith("http"))
|
||||
url = "http://" + url;
|
||||
endpointSand.put("url", url);
|
||||
}
|
||||
endpointSand.put("url", url);
|
||||
}
|
||||
}
|
||||
|
||||
@ -456,7 +456,10 @@ public class ApiDefinitionMapper32to45 {
|
||||
op.setTarget(path);
|
||||
op.setVerb(verb);
|
||||
op.setAuthType(methodDef.path("x-auth-type").asText(""));
|
||||
op.setThrottlingPolicy(methodDef.path("x-throttling-tier").asText(""));
|
||||
JsonNode throttlingNode = methodDef.path("x-throttling-tier");
|
||||
if (!throttlingNode.isMissingNode() && !throttlingNode.asText().isEmpty() && !throttlingNode.asText().equalsIgnoreCase("null")) {
|
||||
op.setThrottlingPolicy(throttlingNode.asText());
|
||||
}
|
||||
op.setScopes(new ArrayList<>());
|
||||
op.setUsedProductIds(new ArrayList<>());
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user