diff options
| author | YuzuRyo61 <cyberman.craft@gmail.com> | 2019-04-15 23:26:20 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2019-04-15 23:26:20 +0900 |
| commit | 71df3e15660026ddfba775aeff35cf83715f72eb (patch) | |
| tree | 3df16a3c735f3eec75b6d0506edc87a3ac46214a /src/server/api/endpoints/app/create.ts | |
| parent | Fix bug (diff) | |
| download | sharkey-71df3e15660026ddfba775aeff35cf83715f72eb.tar.gz sharkey-71df3e15660026ddfba775aeff35cf83715f72eb.tar.bz2 sharkey-71df3e15660026ddfba775aeff35cf83715f72eb.zip | |
APIドキュメントの説明とか一部追記 (#4702)
* Define description in generate.ts
* Add description in create.ts
Diffstat (limited to 'src/server/api/endpoints/app/create.ts')
| -rw-r--r-- | src/server/api/endpoints/app/create.ts | 52 |
1 files changed, 48 insertions, 4 deletions
diff --git a/src/server/api/endpoints/app/create.ts b/src/server/api/endpoints/app/create.ts index ba366cdeb8..9db60d2661 100644 --- a/src/server/api/endpoints/app/create.ts +++ b/src/server/api/endpoints/app/create.ts @@ -9,25 +9,69 @@ export const meta = { tags: ['app'], requireCredential: false, + + desc: { + 'ja-JP': 'アプリを作成します。', + 'en-US': 'Create a application.' + }, params: { name: { - validator: $.str + validator: $.str, + desc: { + 'ja-JP': 'アプリの名前', + 'en-US': 'Name of application' + } }, description: { - validator: $.str + validator: $.str, + desc: { + 'ja-JP': 'アプリの説明', + 'en-US': 'Description of application' + } }, permission: { - validator: $.arr($.str).unique() + validator: $.arr($.str).unique(), + desc: { + 'ja-JP': 'このアプリに割り当てる権限(権限については"Permissions"を参照)', + 'en-US': 'Permissions assigned to this app (see "Permissions" for the permissions)' + } }, // TODO: Check it is valid url callbackUrl: { validator: $.optional.nullable.str, - default: null as any + default: null as any, + desc: { + 'ja-JP': 'アプリ認証時にコールバックするURL', + 'en-US': 'URL to call back at app authentication' + } }, + }, + + res: { + type: 'object', + properties: { + id: { + type: 'string', + description: 'アプリケーションのID' + }, + name: { + type: 'string', + description: 'アプリケーションの名前' + }, + callbackUrl: { + type: 'string', + nullable: true, + description: 'コールバックするURL' + }, + secret: { + type: 'string', + description: 'アプリケーションのシークレットキー' + } + } } }; |