From b359b01700c7ffb1dd633be8b8076c7996d15810 Mon Sep 17 00:00:00 2001 From: Johann150 Date: Thu, 20 Oct 2022 21:22:34 +0200 Subject: [PATCH] improve docs --- .../backend/src/server/api/endpoints/admin/emoji/add.ts | 2 +- .../backend/src/server/api/endpoints/notes/reactions.ts | 6 +++++- packages/backend/src/server/api/openapi/gen-spec.ts | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/add.ts b/packages/backend/src/server/api/endpoints/admin/emoji/add.ts index ecfed084f..2f612fa7c 100644 --- a/packages/backend/src/server/api/endpoints/admin/emoji/add.ts +++ b/packages/backend/src/server/api/endpoints/admin/emoji/add.ts @@ -16,7 +16,7 @@ export const meta = { errors: { noSuchFile: { message: 'No such file.', - code: 'MO_SUCH_FILE', + code: 'NO_SUCH_FILE', id: 'fc46b5a4-6b92-4c33-ac66-b806659bb5cf', }, }, diff --git a/packages/backend/src/server/api/endpoints/notes/reactions.ts b/packages/backend/src/server/api/endpoints/notes/reactions.ts index d9388b47f..fc243c964 100644 --- a/packages/backend/src/server/api/endpoints/notes/reactions.ts +++ b/packages/backend/src/server/api/endpoints/notes/reactions.ts @@ -36,7 +36,11 @@ export const paramDef = { type: 'object', properties: { noteId: { type: 'string', format: 'misskey:id' }, - type: { type: 'string', nullable: true }, + type: { + description: 'A Unicode emoji or custom emoji code. A custom emoji should look like `:name:` or `:name@example.com`.', + type: 'string', + nullable: true, + }, limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, offset: { type: 'integer', default: 0 }, sinceId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/openapi/gen-spec.ts b/packages/backend/src/server/api/openapi/gen-spec.ts index e205ab51e..48b57a03c 100644 --- a/packages/backend/src/server/api/openapi/gen-spec.ts +++ b/packages/backend/src/server/api/openapi/gen-spec.ts @@ -168,7 +168,7 @@ export function genOpenapiSpec() { }, ...(endpoint.meta.limit ? { '429': { - description: 'To many requests', + description: 'Too many requests', content: { 'application/json': { schema: {