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/bookmarks.ts | 89 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) (limited to 'packages/open-api/lib/bookmarks.ts') diff --git a/packages/open-api/lib/bookmarks.ts b/packages/open-api/lib/bookmarks.ts index b45d6350..51c67369 100644 --- a/packages/open-api/lib/bookmarks.ts +++ b/packages/open-api/lib/bookmarks.ts @@ -13,6 +13,7 @@ import { } from "@karakeep/shared/types/bookmarks"; import { BearerAuth } from "./common"; +import { ErrorSchema } from "./errors"; import { HighlightSchema } from "./highlights"; import { BookmarkSchema, @@ -125,6 +126,14 @@ registry.registerPath({ }, }, }, + 400: { + description: "Bad request", + content: { + "application/json": { + schema: ErrorSchema, + }, + }, + }, }, }); registry.registerPath({ @@ -146,6 +155,14 @@ registry.registerPath({ }, }, }, + 404: { + description: "Bookmark not found", + content: { + "application/json": { + schema: ErrorSchema, + }, + }, + }, }, }); @@ -163,6 +180,14 @@ registry.registerPath({ 204: { description: "No content - the bookmark was deleted", }, + 404: { + description: "Bookmark not found", + content: { + "application/json": { + schema: ErrorSchema, + }, + }, + }, }, }); @@ -194,6 +219,14 @@ registry.registerPath({ }, }, }, + 404: { + description: "Bookmark not found", + content: { + "application/json": { + schema: ErrorSchema, + }, + }, + }, }, }); @@ -217,6 +250,14 @@ registry.registerPath({ }, }, }, + 404: { + description: "Bookmark not found", + content: { + "application/json": { + schema: ErrorSchema, + }, + }, + }, }, }); @@ -247,6 +288,14 @@ registry.registerPath({ }, }, }, + 404: { + description: "Bookmark not found", + content: { + "application/json": { + schema: ErrorSchema, + }, + }, + }, }, }); @@ -277,6 +326,14 @@ registry.registerPath({ }, }, }, + 404: { + description: "Bookmark not found", + content: { + "application/json": { + schema: ErrorSchema, + }, + }, + }, }, }); @@ -299,6 +356,14 @@ registry.registerPath({ }, }, }, + 404: { + description: "Bookmark not found", + content: { + "application/json": { + schema: ErrorSchema, + }, + }, + }, }, }); @@ -329,6 +394,14 @@ registry.registerPath({ }, }, }, + 404: { + description: "Bookmark not found", + content: { + "application/json": { + schema: ErrorSchema, + }, + }, + }, }, }); @@ -359,6 +432,14 @@ registry.registerPath({ 204: { description: "No content - asset was replaced successfully", }, + 404: { + description: "Bookmark not found", + content: { + "application/json": { + schema: ErrorSchema, + }, + }, + }, }, }); @@ -379,5 +460,13 @@ registry.registerPath({ 204: { description: "No content - asset was detached successfully", }, + 404: { + description: "Bookmark not found", + content: { + "application/json": { + schema: ErrorSchema, + }, + }, + }, }, }); -- cgit v1.2.3-70-g09d2