aboutsummaryrefslogtreecommitdiffstats
path: root/packages/open-api/lib/bookmarks.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/open-api/lib/bookmarks.ts')
-rw-r--r--packages/open-api/lib/bookmarks.ts26
1 files changed, 26 insertions, 0 deletions
diff --git a/packages/open-api/lib/bookmarks.ts b/packages/open-api/lib/bookmarks.ts
index 09288a4b..c7c05256 100644
--- a/packages/open-api/lib/bookmarks.ts
+++ b/packages/open-api/lib/bookmarks.ts
@@ -74,6 +74,32 @@ registry.registerPath({
});
registry.registerPath({
+ method: "get",
+ path: "/bookmarks/search",
+ description: "Search bookmarks",
+ summary: "Search bookmarks",
+ tags: ["Bookmarks"],
+ security: [{ [BearerAuth.name]: [] }],
+ request: {
+ query: z
+ .object({
+ q: z.string(),
+ })
+ .merge(PaginationSchema),
+ },
+ responses: {
+ 200: {
+ description: "Object with the search results.",
+ content: {
+ "application/json": {
+ schema: PaginatedBookmarksSchema,
+ },
+ },
+ },
+ },
+});
+
+registry.registerPath({
method: "post",
path: "/bookmarks",
description: "Create a new bookmark",