refactor: Expand schema (#7772)
* packedNotificationSchemaを更新 * read:gallery, write:gallery, read:gallery-likes, write:gallery-likesに翻訳を追加 * fix * add header, choice, invitation * test * fix * yatta * remove no longer needed "as PackedUser/PackedNote" * clean up * add simple-schema * fix lint * define items in full Schema * revert https://github.com/misskey-dev/misskey/pull/7772#discussion_r706627736 * user packとnote packの型不整合を修正
This commit is contained in:
15
src/misc/simple-schema.ts
Normal file
15
src/misc/simple-schema.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
export interface SimpleSchema {
|
||||
type: 'boolean' | 'number' | 'string' | 'array' | 'object' | 'any';
|
||||
nullable: boolean;
|
||||
optional: boolean;
|
||||
items?: SimpleSchema;
|
||||
properties?: SimpleObj;
|
||||
description?: string;
|
||||
example?: any;
|
||||
format?: string;
|
||||
ref?: string;
|
||||
enum?: string[];
|
||||
default?: boolean | null;
|
||||
}
|
||||
|
||||
export interface SimpleObj { [key: string]: SimpleSchema; }
|
Reference in New Issue
Block a user