mirror of
https://activitypub.software/TransFem-org/Sharkey
synced 2024-11-30 01:43:03 +00:00
APIドキュメントの説明とか一部追記 (#4702)
* Define description in generate.ts * Add description in create.ts
This commit is contained in:
parent
168c22fc98
commit
71df3e1566
2 changed files with 53 additions and 4 deletions
|
@ -10,24 +10,68 @@ export const meta = {
|
|||
|
||||
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: 'アプリケーションのシークレットキー'
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -11,6 +11,11 @@ export const meta = {
|
|||
|
||||
requireCredential: false,
|
||||
|
||||
desc: {
|
||||
'ja-JP': 'アプリを認証するためのトークンを作成します。',
|
||||
'en-US': 'Generate a token for authorize application.'
|
||||
},
|
||||
|
||||
params: {
|
||||
appSecret: {
|
||||
validator: $.str,
|
||||
|
|
Loading…
Reference in a new issue