From cf97bace33fdd14f29ce947d55d17cba8fa85c11 Mon Sep 17 00:00:00 2001 From: Mohamed Bassem Date: Sun, 13 Apr 2025 01:27:45 +0000 Subject: feat: Add an MCP server for karakeep --- packages/open-api/lib/lists.ts | 73 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) (limited to 'packages/open-api/lib/lists.ts') diff --git a/packages/open-api/lib/lists.ts b/packages/open-api/lib/lists.ts index c66acef4..f2c0d954 100644 --- a/packages/open-api/lib/lists.ts +++ b/packages/open-api/lib/lists.ts @@ -12,6 +12,7 @@ import { import { BookmarkIdSchema } from "./bookmarks"; import { BearerAuth } from "./common"; +import { ErrorSchema } from "./errors"; import { PaginatedBookmarksSchema, PaginationSchema } from "./pagination"; export const registry = new OpenAPIRegistry(); @@ -78,6 +79,14 @@ registry.registerPath({ }, }, }, + 400: { + description: "Bad request", + content: { + "application/json": { + schema: ErrorSchema, + }, + }, + }, }, }); registry.registerPath({ @@ -99,6 +108,14 @@ registry.registerPath({ }, }, }, + 404: { + description: "List not found", + content: { + "application/json": { + schema: ErrorSchema, + }, + }, + }, }, }); @@ -116,6 +133,14 @@ registry.registerPath({ 204: { description: "No content - the bookmark was deleted", }, + 404: { + description: "List not found", + content: { + "application/json": { + schema: ErrorSchema, + }, + }, + }, }, }); @@ -147,6 +172,14 @@ registry.registerPath({ }, }, }, + 404: { + description: "List not found", + content: { + "application/json": { + schema: ErrorSchema, + }, + }, + }, }, }); @@ -170,6 +203,14 @@ registry.registerPath({ }, }, }, + 404: { + description: "List not found", + content: { + "application/json": { + schema: ErrorSchema, + }, + }, + }, }, }); @@ -187,6 +228,22 @@ registry.registerPath({ 204: { description: "No content - the bookmark was added", }, + 400: { + description: "Bookmark already in list", + content: { + "application/json": { + schema: ErrorSchema, + }, + }, + }, + 404: { + description: "List or bookmark not found", + content: { + "application/json": { + schema: ErrorSchema, + }, + }, + }, }, }); @@ -204,5 +261,21 @@ registry.registerPath({ 204: { description: "No content - the bookmark was added", }, + 400: { + description: "Bookmark already not in list", + content: { + "application/json": { + schema: ErrorSchema, + }, + }, + }, + 404: { + description: "List or bookmark not found", + content: { + "application/json": { + schema: ErrorSchema, + }, + }, + }, }, }); -- cgit v1.2.3-70-g09d2