summary refs log tree commit diff
path: root/scripts
diff options
context:
space:
mode:
authorMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2023-06-11 00:27:38 +1000
committerMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2023-06-11 00:27:38 +1000
commit6e47b8e0b345ed064b5bdd8e16bd4d48ca9c9cd8 (patch)
tree2b92ed44e855160b2e580b0db57ad8de473a20e3 /scripts
parentReturn entire guild object in POST /guilds (diff)
downloadserver-6e47b8e0b345ed064b5bdd8e16bd4d48ca9c9cd8.tar.xz
Send user and roles id array in GET /guilds/:id/members/:id
Diffstat (limited to 'scripts')
-rw-r--r--scripts/schema.js32
1 files changed, 1 insertions, 31 deletions
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));
 }