diff --git a/assets/openapi.json b/assets/openapi.json index 840609e5..142f1838 100644 Binary files a/assets/openapi.json and b/assets/openapi.json differ diff --git a/assets/schemas.json b/assets/schemas.json index 906a8b32..bac9b8cd 100644 Binary files a/assets/schemas.json and b/assets/schemas.json differ 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)); } diff --git a/src/util/entities/User.ts b/src/util/entities/User.ts index 85a5015b..1b3eaaca 100644 --- a/src/util/entities/User.ts +++ b/src/util/entities/User.ts @@ -26,11 +26,11 @@ import { OneToOne, } from "typeorm"; import { - adjustEmail, Config, Email, FieldErrors, Snowflake, + adjustEmail, trimSpecial, } from ".."; import { BitField } from "../util/BitField"; @@ -109,8 +109,10 @@ export class User extends BaseClass { @Column({ nullable: true }) banner?: string; // hash of the user banner + // TODO: Separate `User` and `UserProfile` models + // puyo: changed from [number, number] because it breaks openapi @Column({ nullable: true, type: "simple-array" }) - theme_colors?: [number, number]; // TODO: Separate `User` and `UserProfile` models + theme_colors?: number[]; @Column({ nullable: true }) pronouns?: string;