diff options
| author | Mohamed Bassem <me@mbassem.com> | 2025-10-11 18:16:06 +0000 |
|---|---|---|
| committer | Mohamed Bassem <me@mbassem.com> | 2025-10-11 18:16:06 +0000 |
| commit | 7f138b99d4cbb3495dd25d59df2fa767dacc1d35 (patch) | |
| tree | 84ef68cc2a044064b054b5af5d5fc1ebc5897496 /packages/open-api/lib/bookmarks.ts | |
| parent | 87053d2e76a362da9ee417110195ec02673080fd (diff) | |
| download | karakeep-7f138b99d4cbb3495dd25d59df2fa767dacc1d35.tar.zst | |
fix(api): Document the API for getting lists of a bookmark. fixes #2030
Diffstat (limited to 'packages/open-api/lib/bookmarks.ts')
| -rw-r--r-- | packages/open-api/lib/bookmarks.ts | 32 |
1 files changed, 31 insertions, 1 deletions
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); @@ -339,6 +339,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", description: "Get highlights of a bookmark", summary: "Get highlights of a bookmark", |
