From 7f138b99d4cbb3495dd25d59df2fa767dacc1d35 Mon Sep 17 00:00:00 2001 From: Mohamed Bassem Date: Sat, 11 Oct 2025 18:16:06 +0000 Subject: fix(api): Document the API for getting lists of a bookmark. fixes #2030 --- packages/open-api/lib/bookmarks.ts | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) (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 57b50a9b..b2159570 100644 --- a/packages/open-api/lib/bookmarks.ts +++ b/packages/open-api/lib/bookmarks.ts @@ -16,7 +16,6 @@ import { import { AssetIdSchema } from "./assets"; import { BearerAuth } from "./common"; import { ErrorSchema } from "./errors"; -import { HighlightSchema } from "./highlights"; import { BookmarkSchema, IncludeContentSearchParamSchema, @@ -24,6 +23,7 @@ import { PaginationSchema, } from "./pagination"; import { TagIdSchema } from "./tags"; +import { HighlightSchema, ListSchema } from "./types"; export const registry = new OpenAPIRegistry(); extendZodWithOpenApi(z); @@ -337,6 +337,36 @@ registry.registerPath({ }, }); +registry.registerPath({ + method: "get", + path: "/bookmarks/{bookmarkId}/lists", + description: "Get lists of a bookmark", + summary: "Get lists of a bookmark", + tags: ["Bookmarks"], + security: [{ [BearerAuth.name]: [] }], + request: { + params: z.object({ bookmarkId: BookmarkIdSchema }), + }, + responses: { + 200: { + description: "The list of highlights", + content: { + "application/json": { + schema: z.object({ lists: z.array(ListSchema) }), + }, + }, + }, + 404: { + description: "Bookmark not found", + content: { + "application/json": { + schema: ErrorSchema, + }, + }, + }, + }, +}); + registry.registerPath({ method: "get", path: "/bookmarks/{bookmarkId}/highlights", -- cgit v1.2.3-70-g09d2