From a8a28542f73e949a088c48b0b52cddcaac249f6f Mon Sep 17 00:00:00 2001 From: Puyodead1 Date: Thu, 13 Apr 2023 20:13:58 -0400 Subject: fix some types not being generated correctly --- scripts/schema.js | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'scripts') diff --git a/scripts/schema.js b/scripts/schema.js index ef43d80c..16e7d017 100644 --- a/scripts/schema.js +++ b/scripts/schema.js @@ -77,13 +77,15 @@ function main() { const generator = TJS.buildGenerator(program, settings); if (!generator || !program) return; - let schemas = generator - .getUserSymbols() - .filter( - (x) => - (x.endsWith("Schema") || x.endsWith("Response")) && - !Excluded.includes(x), + let schemas = generator.getUserSymbols().filter((x) => { + console.log(x); + return ( + (x.endsWith("Schema") || + x.endsWith("Response") || + x.startsWith("API")) && + !Excluded.includes(x) ); + }); console.log(schemas); var definitions = {}; @@ -135,7 +137,7 @@ function main() { definitions = { ...definitions, [name]: { ...part } }; } - // modify(definitions); + //modify(definitions); fs.writeFileSync(schemaPath, JSON.stringify(definitions, null, 4)); } -- cgit 1.4.1