aboutsummaryrefslogtreecommitdiffstats
path: root/packages/open-api/lib/bookmarks.ts
diff options
context:
space:
mode:
authorMohamed Bassem <me@mbassem.com>2025-04-13 01:27:45 +0000
committerMohamed Bassem <me@mbassem.com>2025-04-13 01:53:11 +0000
commitcf97bace33fdd14f29ce947d55d17cba8fa85c11 (patch)
tree048a88eeabfcb1b1b32b2cd298c229e6c7082341 /packages/open-api/lib/bookmarks.ts
parenta39cd5f3c0a3e287652f945d203facab413b5b65 (diff)
downloadkarakeep-cf97bace33fdd14f29ce947d55d17cba8fa85c11.tar.zst
feat: Add an MCP server for karakeep
Diffstat (limited to 'packages/open-api/lib/bookmarks.ts')
-rw-r--r--packages/open-api/lib/bookmarks.ts89
1 files changed, 89 insertions, 0 deletions
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,
+ },
+ },
+ },
},
});