From 6e47b8e0b345ed064b5bdd8e16bd4d48ca9c9cd8 Mon Sep 17 00:00:00 2001 From: Madeline <46743919+MaddyUnderStars@users.noreply.github.com> Date: Sun, 11 Jun 2023 00:27:38 +1000 Subject: Send user and roles id array in GET /guilds/:id/members/:id --- scripts/schema.js | 32 +------------------------------- 1 file changed, 1 insertion(+), 31 deletions(-) (limited to 'scripts') diff --git a/scripts/schema.js b/scripts/schema.js index b4393558..ff3280ac 100644 --- a/scripts/schema.js +++ b/scripts/schema.js @@ -34,9 +34,7 @@ const settings = { noExtraProps: true, defaultProps: false, }; -const compilerOptions = { - strictNullChecks: true, -}; + const Excluded = [ "DefaultSchema", "Schema", @@ -61,14 +59,6 @@ const Excluded = [ "TransportMakeRequestResponse", ]; -function modify(obj) { - for (var k in obj) { - if (typeof obj[k] === "object" && obj[k] !== null) { - modify(obj[k]); - } - } -} - function main() { const program = TJS.programFromConfig( path.join(__dirname, "..", "tsconfig.json"), @@ -111,32 +101,12 @@ function main() { delete part.properties[key]; continue; } - - // if (part.properties[key].anyOf) { - // const nullIndex = part.properties[key].anyOf.findIndex( - // (x) => x.type == "null", - // ); - // if (nullIndex != -1) { - // part.properties[key].nullable = true; - // part.properties[key].anyOf.splice(nullIndex, 1); - - // if (part.properties[key].anyOf.length == 1) { - // Object.assign( - // part.properties[key], - // part.properties[key].anyOf[0], - // ); - // delete part.properties[key].anyOf; - // } - // } - // } } } definitions = { ...definitions, [name]: { ...part } }; } - //modify(definitions); - fs.writeFileSync(schemaPath, JSON.stringify(definitions, null, 4)); } -- cgit 1.4.1