Add source code link

This commit is contained in:
syuilo 2019-02-23 14:57:05 +09:00
parent 2a8bb23625
commit a8e18e0e22
No known key found for this signature in database
GPG key ID: BDC4C49D06AB9D69

View file

@ -392,6 +392,10 @@ export function genOpenapiSpec(lang = 'ja-JP') {
const info = {
summary: endpoint.name,
description: endpoint.meta.desc ? endpoint.meta.desc[lang] : 'No description provided.',
externalDocs: {
description: 'Source code',
url: `https://github.com/syuilo/misskey/blob/develop/src/server/api/endpoints/${endpoint.name}.ts`
},
...(endpoint.meta.tags ? {
tags: endpoint.meta.tags
} : {}),