feat: add versioned all-available source export catalog
This commit is contained in:
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user