diff options
| author | tamaina <tamaina@hotmail.co.jp> | 2019-04-15 12:10:40 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2019-04-15 12:10:40 +0900 |
| commit | 94f8a145eca5e1ed6b979c2c237e399cc7a96083 (patch) | |
| tree | 96380b38f12fd6d1763154edd6e5460fc93a975a /src/server/api/openapi/gen-spec.ts | |
| parent | Clean up (diff) | |
| download | sharkey-94f8a145eca5e1ed6b979c2c237e399cc7a96083.tar.gz sharkey-94f8a145eca5e1ed6b979c2c237e399cc7a96083.tar.bz2 sharkey-94f8a145eca5e1ed6b979c2c237e399cc7a96083.zip | |
Better permisson Fix #2341 (#4611)
* Better permisson Fix #2341
* add kinds.ts
* test
* fix
* v11
* fix
Diffstat (limited to 'src/server/api/openapi/gen-spec.ts')
| -rw-r--r-- | src/server/api/openapi/gen-spec.ts | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/server/api/openapi/gen-spec.ts b/src/server/api/openapi/gen-spec.ts index 915fb5a6a3..d194c6c8a8 100644 --- a/src/server/api/openapi/gen-spec.ts +++ b/src/server/api/openapi/gen-spec.ts @@ -3,7 +3,7 @@ import { Context } from 'cafy'; import config from '../../../config'; import { errors as basicErrors } from './errors'; import { schemas } from './schemas'; -import { description } from './description'; +import { getDescription } from './description'; import { convertOpenApiSchema } from '../../../misc/schema'; export function genOpenapiSpec(lang = 'ja-JP') { @@ -13,7 +13,7 @@ export function genOpenapiSpec(lang = 'ja-JP') { info: { version: 'v1', title: 'Misskey API', - description: '**Misskey is a decentralized microblogging platform.**\n\n' + description, + description: getDescription(lang), 'x-logo': { url: '/assets/api-doc.png' } }, @@ -110,7 +110,10 @@ export function genOpenapiSpec(lang = 'ja-JP') { let desc = (endpoint.meta.desc ? endpoint.meta.desc[lang] : 'No description provided.') + '\n\n'; desc += `**Credential required**: *${endpoint.meta.requireCredential ? 'Yes' : 'No'}*`; - if (endpoint.meta.kind) desc += ` / **Permission**: *${endpoint.meta.kind}*`; + if (endpoint.meta.kind) { + const kind = endpoint.meta.kind; + desc += ` / **Permission**: *${kind}*`; + } const info = { operationId: endpoint.name, |