diff options
| author | Kagami Sascha Rosylight <saschanaz@outlook.com> | 2023-02-19 09:26:27 +0100 |
|---|---|---|
| committer | Kagami Sascha Rosylight <saschanaz@outlook.com> | 2023-02-19 09:26:27 +0100 |
| commit | cf2b1c1e007d1d537f56b55162bf41b50dc2dd87 (patch) | |
| tree | f449e7aba9de976c466070070c7e4721bdcc6098 /packages/backend/src/models | |
| parent | fix: normalize empty value of `name` into an absent value (diff) | |
| parent | test(backend): restore AP unit tests (#9987) (diff) | |
| download | misskey-cf2b1c1e007d1d537f56b55162bf41b50dc2dd87.tar.gz misskey-cf2b1c1e007d1d537f56b55162bf41b50dc2dd87.tar.bz2 misskey-cf2b1c1e007d1d537f56b55162bf41b50dc2dd87.zip | |
Merge branch 'develop' into mkusername-empty
Diffstat (limited to 'packages/backend/src/models')
| -rw-r--r-- | packages/backend/src/models/schema/emoji.ts | 36 |
1 files changed, 31 insertions, 5 deletions
diff --git a/packages/backend/src/models/schema/emoji.ts b/packages/backend/src/models/schema/emoji.ts index 143f25373c..c00c3dac1d 100644 --- a/packages/backend/src/models/schema/emoji.ts +++ b/packages/backend/src/models/schema/emoji.ts @@ -1,11 +1,37 @@ -export const packedEmojiSchema = { +export const packedEmojiSimpleSchema = { + type: 'object', + properties: { + aliases: { + type: 'array', + optional: false, nullable: false, + items: { + type: 'string', + optional: false, nullable: false, + format: 'id', + }, + }, + name: { + type: 'string', + optional: false, nullable: false, + }, + category: { + type: 'string', + optional: false, nullable: true, + }, + url: { + type: 'string', + optional: false, nullable: false, + }, + }, +} as const; + +export const packedEmojiDetailedSchema = { type: 'object', properties: { id: { type: 'string', - optional: true, nullable: false, + optional: false, nullable: false, format: 'id', - example: 'xxxxxxxxxx', }, aliases: { type: 'array', @@ -26,12 +52,12 @@ export const packedEmojiSchema = { }, host: { type: 'string', - optional: true, nullable: true, + optional: false, nullable: true, description: 'The local host is represented with `null`.', }, url: { type: 'string', - optional: true, nullable: false, + optional: false, nullable: false, }, }, } as const; |