feat: add versioned all-available source export catalog

This commit is contained in:
Aleksandr Meshchryakov
2026-10-22 21:30:18 +02:00
parent 1ffdcd0aaf
commit 63872e86fe
28 changed files with 5754 additions and 240 deletions

View File

@@ -3,6 +3,7 @@ import { readFileSync, writeFileSync } from 'node:fs';
import { resolve } from 'node:path';
import { fileURLToPath } from 'node:url';
import converter from 'swagger2openapi';
import { addSourceExportCatalog } from './source-export-catalog.mjs';
import validator from 'oas-validator';
const base = fileURLToPath(new URL('../..', import.meta.url));
@@ -236,6 +237,7 @@ function removeEmptyRequired(value) {
if (Array.isArray(value.required) && value.required.length === 0) delete value.required;
for (const child of Object.values(value)) removeEmptyRequired(child);
}
addSourceExportCatalog(document);
removeEmptyRequired(document);
const encoded = JSON.stringify(document, null, 2) + '\n';