diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2019-02-25 09:37:22 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2019-02-25 09:37:22 +0900 |
| commit | c4ddfef2ed329b9a98772f730a2605e014ef21ba (patch) | |
| tree | 70fa1e73b72ff7e60aed568fe01b91013e27a829 /src/server/api/openapi | |
| parent | Resolve #4325 (diff) | |
| download | sharkey-c4ddfef2ed329b9a98772f730a2605e014ef21ba.tar.gz sharkey-c4ddfef2ed329b9a98772f730a2605e014ef21ba.tar.bz2 sharkey-c4ddfef2ed329b9a98772f730a2605e014ef21ba.zip | |
Improve doc
Diffstat (limited to 'src/server/api/openapi')
| -rw-r--r-- | src/server/api/openapi/gen-spec.ts | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/server/api/openapi/gen-spec.ts b/src/server/api/openapi/gen-spec.ts index 64da6edbeb..915fb5a6a3 100644 --- a/src/server/api/openapi/gen-spec.ts +++ b/src/server/api/openapi/gen-spec.ts @@ -108,10 +108,14 @@ export function genOpenapiSpec(lang = 'ja-JP') { const resSchema = endpoint.meta.res ? convertOpenApiSchema(endpoint.meta.res) : {}; + 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}*`; + const info = { operationId: endpoint.name, summary: endpoint.name, - description: endpoint.meta.desc ? endpoint.meta.desc[lang] : 'No description provided.', + description: desc, externalDocs: { description: 'Source code', url: `https://github.com/syuilo/misskey/blob/develop/src/server/api/endpoints/${endpoint.name}.ts` |