Introduce OpenAPI specs (#4351)
* wip * wip * wip * Update index.ts * Update gen-openapi-spec.ts * Update api.ja-JP.md * Fix * Improve doc * Update gen-openapi-spec.ts * Update redoc.html * Improve doc * Update gen-openapi-spec.ts * Improve doc * Update CHANGELOG.md
This commit is contained in:
@@ -11,6 +11,8 @@ export const meta = {
|
||||
'en-US': 'Show conversation of a note.'
|
||||
},
|
||||
|
||||
tags: ['notes'],
|
||||
|
||||
requireCredential: false,
|
||||
|
||||
params: {
|
||||
@@ -34,6 +36,13 @@ export const meta = {
|
||||
},
|
||||
},
|
||||
|
||||
res: {
|
||||
type: 'array',
|
||||
items: {
|
||||
type: 'Note',
|
||||
},
|
||||
},
|
||||
|
||||
errors: {
|
||||
noSuchNote: {
|
||||
message: 'No such note.',
|
||||
|
@@ -25,6 +25,8 @@ export const meta = {
|
||||
'ja-JP': '投稿します。'
|
||||
},
|
||||
|
||||
tags: ['notes'],
|
||||
|
||||
requireCredential: true,
|
||||
|
||||
limit: {
|
||||
@@ -175,7 +177,7 @@ export const meta = {
|
||||
type: 'object',
|
||||
props: {
|
||||
createdNote: {
|
||||
type: 'entity(Note)',
|
||||
type: 'Note',
|
||||
desc: {
|
||||
'ja-JP': '作成した投稿'
|
||||
}
|
||||
|
@@ -15,6 +15,8 @@ export const meta = {
|
||||
'en-US': 'Delete a note.'
|
||||
},
|
||||
|
||||
tags: ['notes'],
|
||||
|
||||
requireCredential: true,
|
||||
|
||||
kind: 'note-write',
|
||||
|
@@ -13,6 +13,8 @@ export const meta = {
|
||||
'en-US': 'Favorite a note.'
|
||||
},
|
||||
|
||||
tags: ['favorites'],
|
||||
|
||||
requireCredential: true,
|
||||
|
||||
kind: 'favorite-write',
|
||||
|
@@ -13,6 +13,8 @@ export const meta = {
|
||||
'en-US': 'Unfavorite a note.'
|
||||
},
|
||||
|
||||
tags: ['favorites'],
|
||||
|
||||
requireCredential: true,
|
||||
|
||||
kind: 'favorite-write',
|
||||
|
@@ -10,6 +10,8 @@ export const meta = {
|
||||
'en-US': 'Get featured notes.'
|
||||
},
|
||||
|
||||
tags: ['notes'],
|
||||
|
||||
requireCredential: false,
|
||||
|
||||
params: {
|
||||
@@ -20,7 +22,14 @@ export const meta = {
|
||||
'ja-JP': '最大数'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
res: {
|
||||
type: 'array',
|
||||
items: {
|
||||
type: 'Note',
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export default define(meta, async (ps, user) => {
|
||||
|
@@ -12,6 +12,8 @@ export const meta = {
|
||||
'ja-JP': 'グローバルタイムラインを取得します。'
|
||||
},
|
||||
|
||||
tags: ['notes'],
|
||||
|
||||
params: {
|
||||
withFiles: {
|
||||
validator: $.optional.bool,
|
||||
@@ -51,6 +53,13 @@ export const meta = {
|
||||
},
|
||||
},
|
||||
|
||||
res: {
|
||||
type: 'array',
|
||||
items: {
|
||||
type: 'Note',
|
||||
},
|
||||
},
|
||||
|
||||
errors: {
|
||||
gtlDisabled: {
|
||||
message: 'Global timeline has been disabled.',
|
||||
|
@@ -14,6 +14,8 @@ export const meta = {
|
||||
'ja-JP': 'ハイブリッドタイムラインを取得します。'
|
||||
},
|
||||
|
||||
tags: ['notes'],
|
||||
|
||||
params: {
|
||||
limit: {
|
||||
validator: $.optional.num.range(1, 100),
|
||||
@@ -92,6 +94,13 @@ export const meta = {
|
||||
},
|
||||
},
|
||||
|
||||
res: {
|
||||
type: 'array',
|
||||
items: {
|
||||
type: 'Note',
|
||||
},
|
||||
},
|
||||
|
||||
errors: {
|
||||
stlDisabled: {
|
||||
message: 'Social timeline has been disabled.',
|
||||
|
@@ -13,6 +13,8 @@ export const meta = {
|
||||
'ja-JP': 'ローカルタイムラインを取得します。'
|
||||
},
|
||||
|
||||
tags: ['notes'],
|
||||
|
||||
params: {
|
||||
withFiles: {
|
||||
validator: $.optional.bool,
|
||||
@@ -67,6 +69,13 @@ export const meta = {
|
||||
},
|
||||
},
|
||||
|
||||
res: {
|
||||
type: 'array',
|
||||
items: {
|
||||
type: 'Note',
|
||||
},
|
||||
},
|
||||
|
||||
errors: {
|
||||
ltlDisabled: {
|
||||
message: 'Local timeline has been disabled.',
|
||||
|
@@ -13,6 +13,8 @@ export const meta = {
|
||||
'en-US': 'Get mentions of myself.'
|
||||
},
|
||||
|
||||
tags: ['notes'],
|
||||
|
||||
requireCredential: true,
|
||||
|
||||
params: {
|
||||
@@ -39,7 +41,14 @@ export const meta = {
|
||||
visibility: {
|
||||
validator: $.optional.str,
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
res: {
|
||||
type: 'array',
|
||||
items: {
|
||||
type: 'Note',
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export default define(meta, async (ps, user) => {
|
||||
|
@@ -10,6 +10,8 @@ export const meta = {
|
||||
'en-US': 'Get recommended polls.'
|
||||
},
|
||||
|
||||
tags: ['notes'],
|
||||
|
||||
requireCredential: true,
|
||||
|
||||
params: {
|
||||
|
@@ -18,6 +18,8 @@ export const meta = {
|
||||
'en-US': 'Vote poll of a note.'
|
||||
},
|
||||
|
||||
tags: ['notes'],
|
||||
|
||||
requireCredential: true,
|
||||
|
||||
kind: 'vote-write',
|
||||
|
@@ -11,6 +11,8 @@ export const meta = {
|
||||
'en-US': 'Show reactions of a note.'
|
||||
},
|
||||
|
||||
tags: ['notes', 'reactions'],
|
||||
|
||||
requireCredential: false,
|
||||
|
||||
params: {
|
||||
|
@@ -14,6 +14,8 @@ export const meta = {
|
||||
'en-US': 'React to a note.'
|
||||
},
|
||||
|
||||
tags: ['reactions', 'notes'],
|
||||
|
||||
requireCredential: true,
|
||||
|
||||
kind: 'reaction-write',
|
||||
|
@@ -12,6 +12,8 @@ export const meta = {
|
||||
'en-US': 'Unreact to a note.'
|
||||
},
|
||||
|
||||
tags: ['reactions', 'notes'],
|
||||
|
||||
requireCredential: true,
|
||||
|
||||
kind: 'reaction-write',
|
||||
|
@@ -11,6 +11,8 @@ export const meta = {
|
||||
'en-US': 'Show a renotes of a note.'
|
||||
},
|
||||
|
||||
tags: ['notes'],
|
||||
|
||||
requireCredential: false,
|
||||
|
||||
params: {
|
||||
@@ -39,6 +41,13 @@ export const meta = {
|
||||
}
|
||||
},
|
||||
|
||||
res: {
|
||||
type: 'array',
|
||||
items: {
|
||||
type: 'Note',
|
||||
},
|
||||
},
|
||||
|
||||
errors: {
|
||||
noSuchNote: {
|
||||
message: 'No such note.',
|
||||
|
@@ -11,6 +11,8 @@ export const meta = {
|
||||
'en-US': 'Get replies of a note.'
|
||||
},
|
||||
|
||||
tags: ['notes'],
|
||||
|
||||
requireCredential: false,
|
||||
|
||||
params: {
|
||||
@@ -32,7 +34,14 @@ export const meta = {
|
||||
validator: $.optional.num.min(0),
|
||||
default: 0
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
res: {
|
||||
type: 'array',
|
||||
items: {
|
||||
type: 'Note',
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export default define(meta, async (ps, user) => {
|
||||
|
@@ -12,6 +12,8 @@ export const meta = {
|
||||
'en-US': 'Search notes.'
|
||||
},
|
||||
|
||||
tags: ['notes'],
|
||||
|
||||
requireCredential: false,
|
||||
|
||||
params: {
|
||||
@@ -30,6 +32,13 @@ export const meta = {
|
||||
}
|
||||
},
|
||||
|
||||
res: {
|
||||
type: 'array',
|
||||
items: {
|
||||
type: 'Note',
|
||||
},
|
||||
},
|
||||
|
||||
errors: {
|
||||
searchingNotAvailable: {
|
||||
message: 'Searching not available.',
|
||||
|
@@ -11,6 +11,8 @@ export const meta = {
|
||||
'ja-JP': '指定されたタグが付けられた投稿を取得します。'
|
||||
},
|
||||
|
||||
tags: ['notes', 'hashtags'],
|
||||
|
||||
params: {
|
||||
tag: {
|
||||
validator: $.optional.str,
|
||||
@@ -100,7 +102,14 @@ export const meta = {
|
||||
validator: $.optional.num.range(1, 30),
|
||||
default: 10
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
res: {
|
||||
type: 'array',
|
||||
items: {
|
||||
type: 'Note',
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export default define(meta, async (ps, me) => {
|
||||
|
@@ -13,6 +13,8 @@ export const meta = {
|
||||
'en-US': 'Get a note.'
|
||||
},
|
||||
|
||||
tags: ['notes'],
|
||||
|
||||
requireCredential: false,
|
||||
|
||||
params: {
|
||||
@@ -26,6 +28,10 @@ export const meta = {
|
||||
}
|
||||
},
|
||||
|
||||
res: {
|
||||
type: 'Note',
|
||||
},
|
||||
|
||||
errors: {
|
||||
noSuchNote: {
|
||||
message: 'No such note.',
|
||||
|
@@ -12,6 +12,8 @@ export const meta = {
|
||||
'en-US': 'Get state of a note.'
|
||||
},
|
||||
|
||||
tags: ['notes'],
|
||||
|
||||
requireCredential: true,
|
||||
|
||||
params: {
|
||||
|
@@ -13,6 +13,8 @@ export const meta = {
|
||||
'en-US': 'Get timeline of myself.'
|
||||
},
|
||||
|
||||
tags: ['notes'],
|
||||
|
||||
requireCredential: true,
|
||||
|
||||
params: {
|
||||
@@ -91,7 +93,14 @@ export const meta = {
|
||||
'ja-JP': 'true にすると、ファイルが添付された投稿だけ取得します (このパラメータは廃止予定です。代わりに withFiles を使ってください。)'
|
||||
}
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
res: {
|
||||
type: 'array',
|
||||
items: {
|
||||
type: 'Note',
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export default define(meta, async (ps, user) => {
|
||||
|
@@ -14,6 +14,8 @@ export const meta = {
|
||||
'en-US': 'Get timeline of a user list.'
|
||||
},
|
||||
|
||||
tags: ['notes', 'lists'],
|
||||
|
||||
requireCredential: true,
|
||||
|
||||
params: {
|
||||
@@ -102,6 +104,13 @@ export const meta = {
|
||||
},
|
||||
},
|
||||
|
||||
res: {
|
||||
type: 'array',
|
||||
items: {
|
||||
type: 'Note',
|
||||
},
|
||||
},
|
||||
|
||||
errors: {
|
||||
noSuchList: {
|
||||
message: 'No such list.',
|
||||
|
@@ -13,6 +13,8 @@ export const meta = {
|
||||
'en-US': 'Watch a note.'
|
||||
},
|
||||
|
||||
tags: ['notes'],
|
||||
|
||||
requireCredential: true,
|
||||
|
||||
kind: 'account-write',
|
||||
|
@@ -13,6 +13,8 @@ export const meta = {
|
||||
'en-US': 'Unwatch a note.'
|
||||
},
|
||||
|
||||
tags: ['notes'],
|
||||
|
||||
requireCredential: true,
|
||||
|
||||
kind: 'account-write',
|
||||
|
Reference in New Issue
Block a user