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:
@@ -13,6 +13,8 @@ export const meta = {
|
||||
'en-US': 'Get the notes that specified file of drive attached.'
|
||||
},
|
||||
|
||||
tags: ['drive', 'notes'],
|
||||
|
||||
requireCredential: true,
|
||||
|
||||
kind: 'drive-read',
|
||||
|
@@ -8,6 +8,8 @@ export const meta = {
|
||||
'en-US': 'Returns whether the file with the given MD5 hash exists in the user\'s drive.'
|
||||
},
|
||||
|
||||
tags: ['drive'],
|
||||
|
||||
requireCredential: true,
|
||||
|
||||
kind: 'drive-read',
|
||||
|
@@ -13,6 +13,8 @@ export const meta = {
|
||||
'en-US': 'Upload a file to drive.'
|
||||
},
|
||||
|
||||
tags: ['drive'],
|
||||
|
||||
requireCredential: true,
|
||||
|
||||
limit: {
|
||||
@@ -35,7 +37,7 @@ export const meta = {
|
||||
},
|
||||
|
||||
isSensitive: {
|
||||
validator: $.optional.or($.bool, $.str),
|
||||
validator: $.optional.either($.bool, $.str),
|
||||
default: false,
|
||||
transform: (v: any): boolean => v === true || v === 'true',
|
||||
desc: {
|
||||
@@ -45,7 +47,7 @@ export const meta = {
|
||||
},
|
||||
|
||||
force: {
|
||||
validator: $.optional.or($.bool, $.str),
|
||||
validator: $.optional.either($.bool, $.str),
|
||||
default: false,
|
||||
transform: (v: any): boolean => v === true || v === 'true',
|
||||
desc: {
|
||||
@@ -54,6 +56,10 @@ export const meta = {
|
||||
}
|
||||
},
|
||||
|
||||
res: {
|
||||
type: 'DriveFile',
|
||||
},
|
||||
|
||||
errors: {
|
||||
invalidFileName: {
|
||||
message: 'Invalid file name.',
|
||||
|
@@ -14,6 +14,8 @@ export const meta = {
|
||||
'en-US': 'Delete a file of drive.'
|
||||
},
|
||||
|
||||
tags: ['drive'],
|
||||
|
||||
requireCredential: true,
|
||||
|
||||
kind: 'drive-write',
|
||||
|
@@ -6,6 +6,8 @@ import define from '../../../define';
|
||||
export const meta = {
|
||||
requireCredential: true,
|
||||
|
||||
tags: ['drive'],
|
||||
|
||||
kind: 'drive-read',
|
||||
|
||||
params: {
|
||||
|
@@ -14,6 +14,8 @@ export const meta = {
|
||||
'en-US': 'Get specified file of drive.'
|
||||
},
|
||||
|
||||
tags: ['drive'],
|
||||
|
||||
requireCredential: true,
|
||||
|
||||
kind: 'drive-read',
|
||||
@@ -37,6 +39,10 @@ export const meta = {
|
||||
}
|
||||
},
|
||||
|
||||
res: {
|
||||
type: 'DriveFile',
|
||||
},
|
||||
|
||||
errors: {
|
||||
noSuchFile: {
|
||||
message: 'No such file.',
|
||||
|
@@ -13,6 +13,8 @@ export const meta = {
|
||||
'en-US': 'Update specified file of drive.'
|
||||
},
|
||||
|
||||
tags: ['drive'],
|
||||
|
||||
requireCredential: true,
|
||||
|
||||
kind: 'drive-write',
|
||||
|
@@ -10,6 +10,8 @@ export const meta = {
|
||||
'ja-JP': 'ドライブに指定されたURLに存在するファイルをアップロードします。'
|
||||
},
|
||||
|
||||
tags: ['drive'],
|
||||
|
||||
limit: {
|
||||
duration: ms('1hour'),
|
||||
max: 60
|
||||
|
Reference in New Issue
Block a user