fixed endpoint def

This commit is contained in:
rdavidek 2026-02-19 12:55:34 +01:00
parent b77f50c3e3
commit aa697d0195
2 changed files with 24 additions and 1 deletions

View File

@ -68,7 +68,7 @@ public class ExportApisToWso2FromV32 extends AbstractProcess {
int maxThreads = config.getMaxThreads();
//ExecutorService executor = Executors.newFixedThreadPool(maxThreads);
int skipCount = 0;
int skipCount = 9;
for (SearchedArtifact api : sortedArtifacts) {
final int index = apiCounter.getAndIncrement();

View File

@ -1,5 +1,6 @@
package cz.trask.migration.mapper;
import java.net.URL;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
@ -171,6 +172,17 @@ public class ApiDefinitionMapper32to45 {
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)) {
@ -181,6 +193,17 @@ public class ApiDefinitionMapper32to45 {
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)) {