fix some types not being generated correctly
This commit is contained in:
parent
b14b784467
commit
a8a28542f7
Binary file not shown.
Binary file not shown.
@ -77,13 +77,15 @@ function main() {
|
|||||||
const generator = TJS.buildGenerator(program, settings);
|
const generator = TJS.buildGenerator(program, settings);
|
||||||
if (!generator || !program) return;
|
if (!generator || !program) return;
|
||||||
|
|
||||||
let schemas = generator
|
let schemas = generator.getUserSymbols().filter((x) => {
|
||||||
.getUserSymbols()
|
console.log(x);
|
||||||
.filter(
|
return (
|
||||||
(x) =>
|
(x.endsWith("Schema") ||
|
||||||
(x.endsWith("Schema") || x.endsWith("Response")) &&
|
x.endsWith("Response") ||
|
||||||
!Excluded.includes(x),
|
x.startsWith("API")) &&
|
||||||
|
!Excluded.includes(x)
|
||||||
);
|
);
|
||||||
|
});
|
||||||
console.log(schemas);
|
console.log(schemas);
|
||||||
|
|
||||||
var definitions = {};
|
var definitions = {};
|
||||||
@ -135,7 +137,7 @@ function main() {
|
|||||||
definitions = { ...definitions, [name]: { ...part } };
|
definitions = { ...definitions, [name]: { ...part } };
|
||||||
}
|
}
|
||||||
|
|
||||||
// modify(definitions);
|
//modify(definitions);
|
||||||
|
|
||||||
fs.writeFileSync(schemaPath, JSON.stringify(definitions, null, 4));
|
fs.writeFileSync(schemaPath, JSON.stringify(definitions, null, 4));
|
||||||
}
|
}
|
||||||
|
|||||||
@ -26,11 +26,11 @@ import {
|
|||||||
OneToOne,
|
OneToOne,
|
||||||
} from "typeorm";
|
} from "typeorm";
|
||||||
import {
|
import {
|
||||||
adjustEmail,
|
|
||||||
Config,
|
Config,
|
||||||
Email,
|
Email,
|
||||||
FieldErrors,
|
FieldErrors,
|
||||||
Snowflake,
|
Snowflake,
|
||||||
|
adjustEmail,
|
||||||
trimSpecial,
|
trimSpecial,
|
||||||
} from "..";
|
} from "..";
|
||||||
import { BitField } from "../util/BitField";
|
import { BitField } from "../util/BitField";
|
||||||
@ -109,8 +109,10 @@ export class User extends BaseClass {
|
|||||||
@Column({ nullable: true })
|
@Column({ nullable: true })
|
||||||
banner?: string; // hash of the user banner
|
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" })
|
@Column({ nullable: true, type: "simple-array" })
|
||||||
theme_colors?: [number, number]; // TODO: Separate `User` and `UserProfile` models
|
theme_colors?: number[];
|
||||||
|
|
||||||
@Column({ nullable: true })
|
@Column({ nullable: true })
|
||||||
pronouns?: string;
|
pronouns?: string;
|
||||||
|
|||||||
Reference in New Issue
Block a user