Compare commits
2 Commits
3107c62627
...
66b46259b2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
66b46259b2 | ||
|
|
aa697d0195 |
@ -68,7 +68,7 @@ public class ExportApisToWso2FromV32 extends AbstractProcess {
|
|||||||
int maxThreads = config.getMaxThreads();
|
int maxThreads = config.getMaxThreads();
|
||||||
//ExecutorService executor = Executors.newFixedThreadPool(maxThreads);
|
//ExecutorService executor = Executors.newFixedThreadPool(maxThreads);
|
||||||
|
|
||||||
int skipCount = 0;
|
int skipCount = 9;
|
||||||
|
|
||||||
for (SearchedArtifact api : sortedArtifacts) {
|
for (SearchedArtifact api : sortedArtifacts) {
|
||||||
final int index = apiCounter.getAndIncrement();
|
final int index = apiCounter.getAndIncrement();
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
package cz.trask.migration.mapper;
|
package cz.trask.migration.mapper;
|
||||||
|
|
||||||
|
import java.net.URL;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
@ -183,6 +184,17 @@ public class ApiDefinitionMapper32to45 {
|
|||||||
endpointProd.remove("config");
|
endpointProd.remove("config");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (endpointProd != null && endpointProd.containsKey("url") && endpointProd.get("url") != null) {
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (endpointConfig.get("sandbox_endpoints") != null && (endpointConfig.get("sandbox_endpoints") instanceof Map)) {
|
if (endpointConfig.get("sandbox_endpoints") != null && (endpointConfig.get("sandbox_endpoints") instanceof Map)) {
|
||||||
@ -193,6 +205,17 @@ public class ApiDefinitionMapper32to45 {
|
|||||||
endpointSand.remove("config");
|
endpointSand.remove("config");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (endpointSand != null && endpointSand.containsKey("url") && endpointSand.get("url") != null) {
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (endpointConfig.get("endpoint_security") != null && (endpointConfig.get("endpoint_security") instanceof Map)) {
|
if (endpointConfig.get("endpoint_security") != null && (endpointConfig.get("endpoint_security") instanceof Map)) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user