Compare commits

..

No commits in common. "27e1a13b7cee37fe62286ebda1393c7afbb8c804" and "46cf8b116db772b156a18565eab57514c78cb6ec" have entirely different histories.

2 changed files with 9 additions and 12 deletions

View File

@ -68,12 +68,13 @@ public class ExportApisToWso2FromV32 extends AbstractProcess {
int maxThreads = config.getMaxThreads();
// ExecutorService executor = Executors.newFixedThreadPool(maxThreads);
int skipCount = 722;
// AutosweepIntegrationPPE/AutosweepIntegrationPPE/v1
int skipCount = 31;
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.getId());
log.info("Skipping API {} of {}: {}", index, apis.getCount(), api.getName());
continue;
}
// executor.submit(() -> processApi(api, token, index, apis.getCount()));
@ -320,7 +321,6 @@ 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<>());

View File

@ -195,15 +195,15 @@ public class ApiDefinitionMapper32to45 {
}
}
if (endpointProd != null && endpointProd.containsKey("url") && endpointProd.get("url") != null) {
String url = endpointProd.get("url").toString().trim().replaceAll("\\p{Cf}", "");
String url = endpointProd.get("url").toString();
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().trim().replaceAll("\\p{Cf}", "");
String url = endpointSand.get("url").toString();
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,10 +456,7 @@ public class ApiDefinitionMapper32to45 {
op.setTarget(path);
op.setVerb(verb);
op.setAuthType(methodDef.path("x-auth-type").asText(""));
JsonNode throttlingNode = methodDef.path("x-throttling-tier");
if (!throttlingNode.isMissingNode() && !throttlingNode.asText().isEmpty() && !throttlingNode.asText().equalsIgnoreCase("null")) {
op.setThrottlingPolicy(throttlingNode.asText());
}
op.setThrottlingPolicy(methodDef.path("x-throttling-tier").asText(""));
op.setScopes(new ArrayList<>());
op.setUsedProductIds(new ArrayList<>());