mirror of
https://github.com/misskey-dev/misskey.git
synced 2024-12-24 00:39:32 +09:00
Improve doc
This commit is contained in:
parent
28086111e1
commit
c4ddfef2ed
@ -108,10 +108,14 @@ export function genOpenapiSpec(lang = 'ja-JP') {
|
|||||||
|
|
||||||
const resSchema = endpoint.meta.res ? convertOpenApiSchema(endpoint.meta.res) : {};
|
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 = {
|
const info = {
|
||||||
operationId: endpoint.name,
|
operationId: endpoint.name,
|
||||||
summary: endpoint.name,
|
summary: endpoint.name,
|
||||||
description: endpoint.meta.desc ? endpoint.meta.desc[lang] : 'No description provided.',
|
description: desc,
|
||||||
externalDocs: {
|
externalDocs: {
|
||||||
description: 'Source code',
|
description: 'Source code',
|
||||||
url: `https://github.com/syuilo/misskey/blob/develop/src/server/api/endpoints/${endpoint.name}.ts`
|
url: `https://github.com/syuilo/misskey/blob/develop/src/server/api/endpoints/${endpoint.name}.ts`
|
||||||
|
Loading…
Reference in New Issue
Block a user