summaryrefslogtreecommitdiff
path: root/packages/backend/src/server/api/openapi
diff options
context:
space:
mode:
authorikasoba <57828948+ikasoba@users.noreply.github.com>2023-12-08 15:15:17 +0900
committerGitHub <noreply@github.com>2023-12-08 15:15:17 +0900
commite38af60fd029ed0ce982e3006e8680f3560bd885 (patch)
tree92189039cf542d0f567afd79a7805fa15a8f2e08 /packages/backend/src/server/api/openapi
parentenhance(frontend): ウィジェットを非表示にできるPageMetaを追... (diff)
downloadsharkey-e38af60fd029ed0ce982e3006e8680f3560bd885.tar.gz
sharkey-e38af60fd029ed0ce982e3006e8680f3560bd885.tar.bz2
sharkey-e38af60fd029ed0ce982e3006e8680f3560bd885.zip
fix: `secure: true` なエンドポイントの型が misskey-js に含まれていない (#12603)
* 作った * 修正 * 修正
Diffstat (limited to 'packages/backend/src/server/api/openapi')
-rw-r--r--packages/backend/src/server/api/openapi/gen-spec.ts7
1 files changed, 6 insertions, 1 deletions
diff --git a/packages/backend/src/server/api/openapi/gen-spec.ts b/packages/backend/src/server/api/openapi/gen-spec.ts
index 30bf6b8b3e..0e71510b48 100644
--- a/packages/backend/src/server/api/openapi/gen-spec.ts
+++ b/packages/backend/src/server/api/openapi/gen-spec.ts
@@ -43,7 +43,7 @@ export function genOpenapiSpec(config: Config) {
// 書き換えたりするのでディープコピーしておく。そのまま編集するとメモリ上の値が汚れて次回以降の出力に影響する
const copiedEndpoints = JSON.parse(JSON.stringify(endpoints)) as IEndpoint[];
- for (const endpoint of copiedEndpoints.filter(ep => !ep.meta.secure)) {
+ for (const endpoint of copiedEndpoints) {
const errors = {} as any;
if (endpoint.meta.errors) {
@@ -59,6 +59,11 @@ export function genOpenapiSpec(config: Config) {
const resSchema = endpoint.meta.res ? convertSchemaToOpenApiSchema(endpoint.meta.res) : {};
let desc = (endpoint.meta.description ? endpoint.meta.description : 'No description provided.') + '\n\n';
+
+ if (endpoint.meta.secure) {
+ desc += '**Internal Endpoint**: This endpoint is an API for the misskey mainframe and is not intended for use by third parties.\n';
+ }
+
desc += `**Credential required**: *${endpoint.meta.requireCredential ? 'Yes' : 'No'}*`;
if (endpoint.meta.kind) {
const kind = endpoint.meta.kind;