diff options
Diffstat (limited to 'packages/open-api/lib/bookmarks.ts')
| -rw-r--r-- | packages/open-api/lib/bookmarks.ts | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/packages/open-api/lib/bookmarks.ts b/packages/open-api/lib/bookmarks.ts index 0ddf921e..12a122fa 100644 --- a/packages/open-api/lib/bookmarks.ts +++ b/packages/open-api/lib/bookmarks.ts @@ -12,6 +12,7 @@ import { } from "@hoarder/shared/types/bookmarks"; import { BearerAuth } from "./common"; +import { HighlightSchema } from "./highlights"; import { BookmarkSchema, PaginatedBookmarksSchema, @@ -217,3 +218,25 @@ registry.registerPath({ }, }, }); + +registry.registerPath({ + method: "get", + path: "/bookmarks/{bookmarkId}/highlights", + description: "Get highlights of a bookmark", + summary: "Get highlights 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({ highlights: z.array(HighlightSchema) }), + }, + }, + }, + }, +}); |
