From 2ebe2a57fbbe177512b77b0ca6b8cca6aec858c6 Mon Sep 17 00:00:00 2001 From: Rory& Date: Sat, 29 Nov 2025 22:22:41 +0100 Subject: [PATCH] Cut down schemas by 90% --- .gitignore | 5 + .idea/codeStyles/Project.xml | 1 + .idea/vcs.xml | 1 + .idea/workspace.xml | 7 +- assets/openapi.json | Bin 849306 -> 830463 bytes assets/schemas.json | Bin 3416745 -> 368265 bytes scripts/openapi.js | 7 +- scripts/schema.js | 238 +++++++++++++++--- scripts/schemaExclusions.json | 13 +- scripts/util/getRouteDescriptions.js | 42 +++- src/api/util/handlers/route.ts | 8 +- src/schemas/Validator.ts | 29 ++- .../bots/ApplicationCommandCreateSchema.ts | 13 +- .../api/bots/ApplicationCommandSchema.ts | 6 +- src/util/util/FieldError.ts | 3 +- src/util/util/lambert-server/Server.ts | 11 +- 16 files changed, 302 insertions(+), 82 deletions(-) diff --git a/.gitignore b/.gitignore index dc33551ad..bb79fbf7e 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,8 @@ dump/ result jwt.key* bun.lock + +# optional generated outputs from schema.js +schemas_orig/ +schemas_nested/ +schemas_final/ \ No newline at end of file diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml index 2e2ad3512..d8cb5311f 100644 --- a/.idea/codeStyles/Project.xml +++ b/.idea/codeStyles/Project.xml @@ -7,6 +7,7 @@