refactor imports format
This commit is contained in:
parent
10ec54b5cf
commit
0fed5573d5
@ -253,7 +253,8 @@ public class ImportToApicurio extends AbstractProcess {
|
|||||||
if (endpoints != null) {
|
if (endpoints != null) {
|
||||||
for (Map<String, Object> env : endpoints) {
|
for (Map<String, Object> env : endpoints) {
|
||||||
Map<String, String> urls = (Map<String, String>) env.get("URLs");
|
Map<String, String> urls = (Map<String, String>) env.get("URLs");
|
||||||
if (urls == null || urls.isEmpty()) continue;
|
if (urls == null || urls.isEmpty())
|
||||||
|
continue;
|
||||||
|
|
||||||
ObjectNode server = mapper.createObjectNode();
|
ObjectNode server = mapper.createObjectNode();
|
||||||
urls.forEach((k, v) -> {
|
urls.forEach((k, v) -> {
|
||||||
@ -316,7 +317,8 @@ public class ImportToApicurio extends AbstractProcess {
|
|||||||
for (ZipEntryData entry : zipEntries) {
|
for (ZipEntryData entry : zipEntries) {
|
||||||
String artifactId = api.getName() + "/" + api.getVersion() + "/" + entry.getName();
|
String artifactId = api.getName() + "/" + api.getVersion() + "/" + entry.getName();
|
||||||
|
|
||||||
//ApiDefinition apiDef = mapper.readValue(entry.getContent(), ApiDefinition.class);
|
// ApiDefinition apiDef = mapper.readValue(entry.getContent(),
|
||||||
|
// ApiDefinition.class);
|
||||||
|
|
||||||
// Create the artifact (versioned)
|
// Create the artifact (versioned)
|
||||||
try (ByteArrayInputStream is = new ByteArrayInputStream(entry.getContent())) {
|
try (ByteArrayInputStream is = new ByteArrayInputStream(entry.getContent())) {
|
||||||
|
|||||||
@ -77,8 +77,8 @@ public class ZipUtils {
|
|||||||
return buffer.toByteArray();
|
return buffer.toByteArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static byte[] prepareApiZipFile32to45(RegistryClient client, SearchedVersion ver, List<ArtifactReference> ref)
|
public static byte[] prepareApiZipFile32to45(RegistryClient client, SearchedVersion ver,
|
||||||
throws IOException {
|
List<ArtifactReference> ref) throws IOException {
|
||||||
|
|
||||||
String baseDir = ver.getName() + "-" + ver.getVersion() + "/";
|
String baseDir = ver.getName() + "-" + ver.getVersion() + "/";
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user