inline documentation fixed

This commit is contained in:
rdavidek 2026-02-19 14:13:00 +01:00
parent 66b46259b2
commit a118cf6c0b

View File

@ -68,7 +68,8 @@ public class ExportApisToWso2FromV32 extends AbstractProcess {
int maxThreads = config.getMaxThreads();
// ExecutorService executor = Executors.newFixedThreadPool(maxThreads);
int skipCount = 9;
// AutosweepIntegrationPPE/AutosweepIntegrationPPE/v1
int skipCount = 23;
for (SearchedArtifact api : sortedArtifacts) {
final int index = apiCounter.getAndIncrement();
@ -186,11 +187,19 @@ public class ExportApisToWso2FromV32 extends AbstractProcess {
} else if (FileType.DOCUMENTATION.toString().equals(amd.getGroupId())) {
subDir = "Docs/";
if (content != null && content.length > 0) {
List<Documents32> docs = mapperYaml.readValue(content, new TypeReference<List<Documents32>>() {
if (r.getName().endsWith(".yaml") || r.getName().endsWith(".yml")) {
List<Documents32> docs = mapperYaml.readValue(content,
new TypeReference<List<Documents32>>() {
});
for (Documents32 doc : docs) {
convertAndAddDocument(zos, baseDir + subDir, doc, ref);
}
} else {
String fileName = baseDir + subDir + r.getName() + "/" + r.getName();
zos.putNextEntry(new ZipEntry(fileName));
zos.write(content);
zos.closeEntry();
}
}
appendFile = false;
} else if (FileType.DOCUMENTATION_FILE.toString().equals(amd.getGroupId())) {
@ -221,7 +230,8 @@ public class ExportApisToWso2FromV32 extends AbstractProcess {
}
}
private void convertAndAddDocument(ZipOutputStream zos, String subDir, Documents32 doc, List<ArtifactReference> ref) throws Exception {
private void convertAndAddDocument(ZipOutputStream zos, String subDir, Documents32 doc, List<ArtifactReference> ref)
throws Exception {
Documents45 doc45 = new Documents45();
Documents45.Data doc45Data = new Documents45.Data();