summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2019-02-24 18:13:11 +0900
committersyuilo <syuilotan@yahoo.co.jp>2019-02-24 18:13:11 +0900
commitfcc6a65e08e502fb11e9603aabfa237dd82d4b25 (patch)
treec53279a8e00ec6da552a8d3ed5f534d972a7511f /src
parentハイフンに統一 (diff)
downloadsharkey-fcc6a65e08e502fb11e9603aabfa237dd82d4b25.tar.gz
sharkey-fcc6a65e08e502fb11e9603aabfa237dd82d4b25.tar.bz2
sharkey-fcc6a65e08e502fb11e9603aabfa237dd82d4b25.zip
Improve doc
Diffstat (limited to 'src')
-rw-r--r--src/server/api/endpoints/drive/files/attached-notes.ts7
-rw-r--r--src/server/api/endpoints/drive/files/check-existence.ts6
-rw-r--r--src/server/api/endpoints/drive/stream.ts9
-rw-r--r--src/server/api/endpoints/i/notifications.ts9
-rw-r--r--src/server/api/openapi/schemas.ts22
5 files changed, 50 insertions, 3 deletions
diff --git a/src/server/api/endpoints/drive/files/attached-notes.ts b/src/server/api/endpoints/drive/files/attached-notes.ts
index c1d828b05a..c9eeab58c5 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 12680d5419..926411c83a 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 f6586a8523..916482be4d 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 3d038e5d34..d3e3064abd 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 6450dcb3ff..a57be81502 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: {