diff --git a/src/server/api/endpoints/drive/files/attached-notes.ts b/src/server/api/endpoints/drive/files/attached-notes.ts index c1d828b05a46fcac0141e42d898e1d0ab8d5c3e3..c9eeab58c597443f9eeab522e03a49f2e98565d4 100644 --- a/src/server/api/endpoints/drive/files/attached-notes.ts +++ b/src/server/api/endpoints/drive/files/attached-notes.ts @@ -30,6 +30,13 @@ export const meta = { } }, + res: { + type: 'array', + items: { + type: 'Note', + }, + }, + errors: { noSuchFile: { message: 'No such file.', diff --git a/src/server/api/endpoints/drive/files/check-existence.ts b/src/server/api/endpoints/drive/files/check-existence.ts index 12680d54197cf4b615d0d6948c9cb0261f03d385..926411c83accbfb6dba18950c74b1c82c79dba46 100644 --- a/src/server/api/endpoints/drive/files/check-existence.ts +++ b/src/server/api/endpoints/drive/files/check-existence.ts @@ -21,7 +21,11 @@ export const meta = { 'ja-JP': 'ファイルã®MD5ãƒãƒƒã‚·ãƒ¥' } } - } + }, + + res: { + type: 'DriveFile', + }, }; export default define(meta, async (ps, user) => { diff --git a/src/server/api/endpoints/drive/stream.ts b/src/server/api/endpoints/drive/stream.ts index f6586a85231d5568387e40e369e657b2ba1549b3..916482be4d76d6665001d4b0bfd6555ee1fd1905 100644 --- a/src/server/api/endpoints/drive/stream.ts +++ b/src/server/api/endpoints/drive/stream.ts @@ -29,7 +29,14 @@ export const meta = { type: { validator: $.optional.str.match(/^[a-zA-Z\/\-\*]+$/) } - } + }, + + res: { + type: 'array', + items: { + type: 'DriveFile', + }, + }, }; export default define(meta, async (ps, user) => { diff --git a/src/server/api/endpoints/i/notifications.ts b/src/server/api/endpoints/i/notifications.ts index 3d038e5d3479926db8b9c0dbf7a6eb1ededdfa00..d3e3064abd3ae5f81b8f580588c07cb20ae47e71 100644 --- a/src/server/api/endpoints/i/notifications.ts +++ b/src/server/api/endpoints/i/notifications.ts @@ -54,7 +54,14 @@ export const meta = { validator: $.optional.arr($.str.or(['follow', 'mention', 'reply', 'renote', 'quote', 'reaction', 'poll_vote', 'receiveFollowRequest'])), default: [] as string[] } - } + }, + + res: { + type: 'array', + items: { + type: 'Notification', + }, + }, }; export default define(meta, async (ps, user) => { diff --git a/src/server/api/openapi/schemas.ts b/src/server/api/openapi/schemas.ts index 6450dcb3ff6028d5093c893b9fe6e227cfcbfb35..a57be81502e577b0b2b97c5f6f5929edc12c20d7 100644 --- a/src/server/api/openapi/schemas.ts +++ b/src/server/api/openapi/schemas.ts @@ -146,6 +146,28 @@ export const schemas = { required: ['id', 'userId', 'createdAt'] }, + Notification: { + type: 'object', + properties: { + id: { + type: 'string', + format: 'id', + description: 'The unique identifier for this notification.' + }, + createdAt: { + type: 'string', + format: 'date-time', + description: 'The date that the notification was created.' + }, + type: { + type: 'string', + enum: ['follow', 'receiveFollowRequest', 'mention', 'reply', 'renote', 'quote', 'reaction', 'poll_vote'], + description: 'The type of the notification.' + }, + }, + required: ['id', 'createdAt', 'type'] + }, + DriveFile: { type: 'object', properties: {