From a515c1f53ebcb8eba0c20b1f7951573d2ca7809e Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 3 Nov 2018 22:49:36 +0900 Subject: [PATCH] Improve API documentation --- src/server/api/endpoints/following/requests/accept.ts | 4 ++++ src/server/api/endpoints/following/requests/cancel.ts | 4 ++++ src/server/api/endpoints/following/requests/reject.ts | 4 ++++ src/server/api/endpoints/following/stalk.ts | 4 ++++ src/server/api/endpoints/following/unstalk.ts | 4 ++++ src/server/api/endpoints/games/reversi/match.ts | 4 ++++ src/server/api/endpoints/messaging/messages.ts | 4 ++++ src/server/api/endpoints/messaging/messages/create.ts | 4 ++++ src/server/api/endpoints/mute/create.ts | 4 ++++ src/server/api/endpoints/mute/delete.ts | 4 ++++ src/server/api/endpoints/notes/conversation.ts | 4 ++++ src/server/api/endpoints/notes/polls/vote.ts | 4 ++++ src/server/api/endpoints/notes/reactions/delete.ts | 4 ++++ src/server/api/endpoints/notes/renotes.ts | 4 ++++ src/server/api/endpoints/notes/replies.ts | 4 ++++ src/server/api/endpoints/users/followers.ts | 4 ++++ src/server/api/endpoints/users/following.ts | 4 ++++ .../api/endpoints/users/get_frequently_replied_users.ts | 4 ++++ src/server/api/endpoints/users/lists/push.ts | 4 ++++ src/server/api/endpoints/users/notes.ts | 3 ++- src/server/api/endpoints/users/show.ts | 3 ++- 21 files changed, 80 insertions(+), 2 deletions(-) diff --git a/src/server/api/endpoints/following/requests/accept.ts b/src/server/api/endpoints/following/requests/accept.ts index 36c3694ee..2cca3a1cc 100644 --- a/src/server/api/endpoints/following/requests/accept.ts +++ b/src/server/api/endpoints/following/requests/accept.ts @@ -17,6 +17,10 @@ export const meta = { userId: { validator: $.type(ID), transform: transform, + desc: { + 'ja-JP': '対象のユーザーのID', + 'en-US': 'Target user ID' + } } } }; diff --git a/src/server/api/endpoints/following/requests/cancel.ts b/src/server/api/endpoints/following/requests/cancel.ts index bfb7d0713..f2dec9ffa 100644 --- a/src/server/api/endpoints/following/requests/cancel.ts +++ b/src/server/api/endpoints/following/requests/cancel.ts @@ -17,6 +17,10 @@ export const meta = { userId: { validator: $.type(ID), transform: transform, + desc: { + 'ja-JP': '対象のユーザーのID', + 'en-US': 'Target user ID' + } } } }; diff --git a/src/server/api/endpoints/following/requests/reject.ts b/src/server/api/endpoints/following/requests/reject.ts index bd0b3bba2..cce41e2df 100644 --- a/src/server/api/endpoints/following/requests/reject.ts +++ b/src/server/api/endpoints/following/requests/reject.ts @@ -17,6 +17,10 @@ export const meta = { userId: { validator: $.type(ID), transform: transform, + desc: { + 'ja-JP': '対象のユーザーのID', + 'en-US': 'Target user ID' + } } } }; diff --git a/src/server/api/endpoints/following/stalk.ts b/src/server/api/endpoints/following/stalk.ts index 1fef9a429..3a58e2192 100644 --- a/src/server/api/endpoints/following/stalk.ts +++ b/src/server/api/endpoints/following/stalk.ts @@ -16,6 +16,10 @@ export const meta = { userId: { validator: $.type(ID), transform: transform, + desc: { + 'ja-JP': '対象のユーザーのID', + 'en-US': 'Target user ID' + } } } }; diff --git a/src/server/api/endpoints/following/unstalk.ts b/src/server/api/endpoints/following/unstalk.ts index 66e99bed5..ad07ec38b 100644 --- a/src/server/api/endpoints/following/unstalk.ts +++ b/src/server/api/endpoints/following/unstalk.ts @@ -16,6 +16,10 @@ export const meta = { userId: { validator: $.type(ID), transform: transform, + desc: { + 'ja-JP': '対象のユーザーのID', + 'en-US': 'Target user ID' + } } } }; diff --git a/src/server/api/endpoints/games/reversi/match.ts b/src/server/api/endpoints/games/reversi/match.ts index e0f9c20cb..43b6fc8ee 100644 --- a/src/server/api/endpoints/games/reversi/match.ts +++ b/src/server/api/endpoints/games/reversi/match.ts @@ -13,6 +13,10 @@ export const meta = { userId: { validator: $.type(ID), transform: transform, + desc: { + 'ja-JP': '対象のユーザーのID', + 'en-US': 'Target user ID' + } }, } }; diff --git a/src/server/api/endpoints/messaging/messages.ts b/src/server/api/endpoints/messaging/messages.ts index 50a5eb00d..3d033f110 100644 --- a/src/server/api/endpoints/messaging/messages.ts +++ b/src/server/api/endpoints/messaging/messages.ts @@ -19,6 +19,10 @@ export const meta = { userId: { validator: $.type(ID), transform: transform, + desc: { + 'ja-JP': '対象のユーザーのID', + 'en-US': 'Target user ID' + } }, limit: { diff --git a/src/server/api/endpoints/messaging/messages/create.ts b/src/server/api/endpoints/messaging/messages/create.ts index bcd4d6b63..f8901449f 100644 --- a/src/server/api/endpoints/messaging/messages/create.ts +++ b/src/server/api/endpoints/messaging/messages/create.ts @@ -25,6 +25,10 @@ export const meta = { userId: { validator: $.type(ID), transform: transform, + desc: { + 'ja-JP': '対象のユーザーのID', + 'en-US': 'Target user ID' + } }, text: { diff --git a/src/server/api/endpoints/mute/create.ts b/src/server/api/endpoints/mute/create.ts index f3bb3da14..13323da32 100644 --- a/src/server/api/endpoints/mute/create.ts +++ b/src/server/api/endpoints/mute/create.ts @@ -17,6 +17,10 @@ export const meta = { userId: { validator: $.type(ID), transform: transform, + desc: { + 'ja-JP': '対象のユーザーのID', + 'en-US': 'Target user ID' + } }, } }; diff --git a/src/server/api/endpoints/mute/delete.ts b/src/server/api/endpoints/mute/delete.ts index 68de0feb2..3808c1527 100644 --- a/src/server/api/endpoints/mute/delete.ts +++ b/src/server/api/endpoints/mute/delete.ts @@ -17,6 +17,10 @@ export const meta = { userId: { validator: $.type(ID), transform: transform, + desc: { + 'ja-JP': '対象のユーザーのID', + 'en-US': 'Target user ID' + } }, } }; diff --git a/src/server/api/endpoints/notes/conversation.ts b/src/server/api/endpoints/notes/conversation.ts index 7703ef7d2..5e6e5ddb0 100644 --- a/src/server/api/endpoints/notes/conversation.ts +++ b/src/server/api/endpoints/notes/conversation.ts @@ -14,6 +14,10 @@ export const meta = { noteId: { validator: $.type(ID), transform: transform, + desc: { + 'ja-JP': '対象の投稿のID', + 'en-US': 'Target note ID' + } }, limit: { diff --git a/src/server/api/endpoints/notes/polls/vote.ts b/src/server/api/endpoints/notes/polls/vote.ts index f50e84ba1..dc012152c 100644 --- a/src/server/api/endpoints/notes/polls/vote.ts +++ b/src/server/api/endpoints/notes/polls/vote.ts @@ -21,6 +21,10 @@ export const meta = { noteId: { validator: $.type(ID), transform: transform, + desc: { + 'ja-JP': '対象の投稿のID', + 'en-US': 'Target note ID' + } }, choice: { diff --git a/src/server/api/endpoints/notes/reactions/delete.ts b/src/server/api/endpoints/notes/reactions/delete.ts index 60f49fb27..53e2f476b 100644 --- a/src/server/api/endpoints/notes/reactions/delete.ts +++ b/src/server/api/endpoints/notes/reactions/delete.ts @@ -17,6 +17,10 @@ export const meta = { noteId: { validator: $.type(ID), transform: transform, + desc: { + 'ja-JP': '対象の投稿のID', + 'en-US': 'Target note ID' + } }, } }; diff --git a/src/server/api/endpoints/notes/renotes.ts b/src/server/api/endpoints/notes/renotes.ts index 85d5820e5..2a434dd06 100644 --- a/src/server/api/endpoints/notes/renotes.ts +++ b/src/server/api/endpoints/notes/renotes.ts @@ -14,6 +14,10 @@ export const meta = { noteId: { validator: $.type(ID), transform: transform, + desc: { + 'ja-JP': '対象の投稿のID', + 'en-US': 'Target note ID' + } }, limit: { diff --git a/src/server/api/endpoints/notes/replies.ts b/src/server/api/endpoints/notes/replies.ts index 8b5a3593d..6046b9b31 100644 --- a/src/server/api/endpoints/notes/replies.ts +++ b/src/server/api/endpoints/notes/replies.ts @@ -14,6 +14,10 @@ export const meta = { noteId: { validator: $.type(ID), transform: transform, + desc: { + 'ja-JP': '対象の投稿のID', + 'en-US': 'Target note ID' + } }, limit: { diff --git a/src/server/api/endpoints/users/followers.ts b/src/server/api/endpoints/users/followers.ts index 9e3a30f6f..e7f74b065 100644 --- a/src/server/api/endpoints/users/followers.ts +++ b/src/server/api/endpoints/users/followers.ts @@ -17,6 +17,10 @@ export const meta = { userId: { validator: $.type(ID), transform: transform, + desc: { + 'ja-JP': '対象のユーザーのID', + 'en-US': 'Target user ID' + } }, limit: { diff --git a/src/server/api/endpoints/users/following.ts b/src/server/api/endpoints/users/following.ts index 57bf1e1e8..371a54f90 100644 --- a/src/server/api/endpoints/users/following.ts +++ b/src/server/api/endpoints/users/following.ts @@ -17,6 +17,10 @@ export const meta = { userId: { validator: $.type(ID), transform: transform, + desc: { + 'ja-JP': '対象のユーザーのID', + 'en-US': 'Target user ID' + } }, limit: { diff --git a/src/server/api/endpoints/users/get_frequently_replied_users.ts b/src/server/api/endpoints/users/get_frequently_replied_users.ts index 6b8b985ee..cf123b82b 100644 --- a/src/server/api/endpoints/users/get_frequently_replied_users.ts +++ b/src/server/api/endpoints/users/get_frequently_replied_users.ts @@ -10,6 +10,10 @@ export const meta = { userId: { validator: $.type(ID), transform: transform, + desc: { + 'ja-JP': '対象のユーザーのID', + 'en-US': 'Target user ID' + } }, limit: { diff --git a/src/server/api/endpoints/users/lists/push.ts b/src/server/api/endpoints/users/lists/push.ts index 5c11f25dc..396f9813a 100644 --- a/src/server/api/endpoints/users/lists/push.ts +++ b/src/server/api/endpoints/users/lists/push.ts @@ -26,6 +26,10 @@ export const meta = { userId: { validator: $.type(ID), transform: transform, + desc: { + 'ja-JP': '対象のユーザーのID', + 'en-US': 'Target user ID' + } }, } }; diff --git a/src/server/api/endpoints/users/notes.ts b/src/server/api/endpoints/users/notes.ts index 4bbacab2b..7901ac1de 100644 --- a/src/server/api/endpoints/users/notes.ts +++ b/src/server/api/endpoints/users/notes.ts @@ -15,7 +15,8 @@ export const meta = { validator: $.type(ID).optional, transform: transform, desc: { - 'ja-JP': 'ユーザーID' + 'ja-JP': '対象のユーザーのID', + 'en-US': 'Target user ID' } }, diff --git a/src/server/api/endpoints/users/show.ts b/src/server/api/endpoints/users/show.ts index 93223b3f9..6e4cf514d 100644 --- a/src/server/api/endpoints/users/show.ts +++ b/src/server/api/endpoints/users/show.ts @@ -17,7 +17,8 @@ export const meta = { validator: $.type(ID).optional, transform: transform, desc: { - 'ja-JP': 'ユーザーID' + 'ja-JP': '対象のユーザーのID', + 'en-US': 'Target user ID' } },