generate open api schema based on body and db entities

This commit is contained in:
Flam3rboy
2021-09-01 23:33:14 +02:00
parent b5456f10cc
commit 1a76c663d2
10 changed files with 1853 additions and 768 deletions
+2 -3
View File
@@ -1,14 +1,13 @@
// https://discord.com/developers/docs/resources/emoji
export const EmojiCreateSchema = {
name: String, //name of the emoji
image: String, // image data the 128x128 emoji image uri
roles: Array //roles allowed to use this emoji
$roles: Array //roles allowed to use this emoji
};
export interface EmojiCreateSchema {
name: string; // name of the emoji
image: string; // image data the 128x128 emoji image uri
roles: []; //roles allowed to use this emoji
roles?: string[]; //roles allowed to use this emoji
}
+1 -1
View File
@@ -48,7 +48,7 @@ export interface GuildUpdateSchema extends Omit<GuildCreateSchema, "channels"> {
banner?: string;
splash?: string;
description?: string;
features?: [string];
features?: string[];
verification_level?: number;
default_message_notifications?: number;
system_channel_flags?: number;
+9 -9
View File
@@ -10,13 +10,13 @@ export const InviteCreateSchema = {
$target_user_type: Number
};
export interface InviteCreateSchema {
target_user_id?: String;
target_type?: String;
validate?: String; //? wtf is this
max_age?: Number;
max_uses?: Number;
temporary?: Boolean;
unique?: Boolean;
target_user?: String;
target_user_type?: Number;
target_user_id?: string;
target_type?: string;
validate?: string; //? wtf is this
max_age?: number;
max_uses?: number;
temporary?: boolean;
unique?: boolean;
target_user?: string;
target_user_type?: number;
}
+11
View File
@@ -0,0 +1,11 @@
export * from "./Ban";
export * from "./Channel";
export * from "./Emoji";
export * from "./Guild";
export * from "./Invite";
export * from "./Member";
export * from "./Message";
export * from "./Roles";
export * from "./Template";
export * from "./User";
export * from "./Widget";