diff options
| author | Mohamed Bassem <me@mbassem.com> | 2024-10-20 18:32:36 +0000 |
|---|---|---|
| committer | Mohamed Bassem <me@mbassem.com> | 2024-10-20 18:32:36 +0000 |
| commit | b476e91918706e2534916446889d5fa8da866f05 (patch) | |
| tree | b980785377409dd322db1d4c5bfb0ba5364969ea /packages/open-api/lib | |
| parent | 6ffa51dfcc5d2a0e997841e547f4a50bbd9dbb3b (diff) | |
| download | karakeep-b476e91918706e2534916446889d5fa8da866f05.tar.zst | |
api: Add tag ids and support variable baseURL
Diffstat (limited to 'packages/open-api/lib')
| -rw-r--r-- | packages/open-api/lib/bookmarks.ts | 7 | ||||
| -rw-r--r-- | packages/open-api/lib/lists.ts | 8 | ||||
| -rw-r--r-- | packages/open-api/lib/tags.ts | 5 |
3 files changed, 20 insertions, 0 deletions
diff --git a/packages/open-api/lib/bookmarks.ts b/packages/open-api/lib/bookmarks.ts index 28ef7e0d..0ddf921e 100644 --- a/packages/open-api/lib/bookmarks.ts +++ b/packages/open-api/lib/bookmarks.ts @@ -38,6 +38,7 @@ registry.registerPath({ path: "/bookmarks", description: "Get all bookmarks", summary: "Get all bookmarks", + tags: ["Bookmarks"], security: [{ [BearerAuth.name]: [] }], request: { query: z @@ -64,6 +65,7 @@ registry.registerPath({ path: "/bookmarks", description: "Create a new bookmark", summary: "Create a new bookmark", + tags: ["Bookmarks"], security: [{ [BearerAuth.name]: [] }], request: { body: { @@ -91,6 +93,7 @@ registry.registerPath({ path: "/bookmarks/{bookmarkId}", description: "Get bookmark by its id", summary: "Get a single bookmark", + tags: ["Bookmarks"], security: [{ [BearerAuth.name]: [] }], request: { params: z.object({ bookmarkId: BookmarkIdSchema }), @@ -112,6 +115,7 @@ registry.registerPath({ path: "/bookmarks/{bookmarkId}", description: "Delete bookmark by its id", summary: "Delete a bookmark", + tags: ["Bookmarks"], security: [{ [BearerAuth.name]: [] }], request: { params: z.object({ bookmarkId: BookmarkIdSchema }), @@ -128,6 +132,7 @@ registry.registerPath({ path: "/bookmarks/{bookmarkId}", description: "Update bookmark by its id", summary: "Update a bookmark", + tags: ["Bookmarks"], security: [{ [BearerAuth.name]: [] }], request: { params: z.object({ bookmarkId: BookmarkIdSchema }), @@ -158,6 +163,7 @@ registry.registerPath({ path: "/bookmarks/{bookmarkId}/tags", description: "Attach tags to a bookmark", summary: "Attach tags to a bookmark", + tags: ["Bookmarks"], security: [{ [BearerAuth.name]: [] }], request: { params: z.object({ bookmarkId: BookmarkIdSchema }), @@ -187,6 +193,7 @@ registry.registerPath({ path: "/bookmarks/{bookmarkId}/tags", description: "Detach tags from a bookmark", summary: "Detach tags from a bookmark", + tags: ["Bookmarks"], security: [{ [BearerAuth.name]: [] }], request: { params: z.object({ bookmarkId: BookmarkIdSchema }), diff --git a/packages/open-api/lib/lists.ts b/packages/open-api/lib/lists.ts index 27f458fc..aa5d57f3 100644 --- a/packages/open-api/lib/lists.ts +++ b/packages/open-api/lib/lists.ts @@ -34,6 +34,7 @@ registry.registerPath({ path: "/lists", description: "Get all lists", summary: "Get all lists", + tags: ["Lists"], security: [{ [BearerAuth.name]: [] }], request: {}, responses: { @@ -55,6 +56,7 @@ registry.registerPath({ path: "/lists", description: "Create a new list", summary: "Create a new list", + tags: ["Lists"], security: [{ [BearerAuth.name]: [] }], request: { body: { @@ -82,6 +84,7 @@ registry.registerPath({ path: "/lists/{listId}", description: "Get list by its id", summary: "Get a single list", + tags: ["Lists"], security: [{ [BearerAuth.name]: [] }], request: { params: z.object({ listId: ListIdSchema }), @@ -103,6 +106,7 @@ registry.registerPath({ path: "/lists/{listId}", description: "Delete list by its id", summary: "Delete a list", + tags: ["Lists"], security: [{ [BearerAuth.name]: [] }], request: { params: z.object({ listId: ListIdSchema }), @@ -119,6 +123,7 @@ registry.registerPath({ path: "/list/{listId}", description: "Update list by its id", summary: "Update a list", + tags: ["Lists"], security: [{ [BearerAuth.name]: [] }], request: { params: z.object({ listId: ListIdSchema }), @@ -149,6 +154,7 @@ registry.registerPath({ path: "/lists/{listId}/bookmarks", description: "Get the bookmarks in a list", summary: "Get a bookmarks in a list", + tags: ["Lists"], security: [{ [BearerAuth.name]: [] }], request: { params: z.object({ listId: ListIdSchema }), @@ -171,6 +177,7 @@ registry.registerPath({ path: "/lists/{listId}/bookmarks/{bookmarkId}", description: "Add the bookmarks to a list", summary: "Add a bookmark to a list", + tags: ["Lists"], security: [{ [BearerAuth.name]: [] }], request: { params: z.object({ listId: ListIdSchema, bookmarkId: BookmarkIdSchema }), @@ -187,6 +194,7 @@ registry.registerPath({ path: "/lists/{listId}/bookmarks/{bookmarkId}", description: "Remove the bookmarks from a list", summary: "Remove a bookmark from a list", + tags: ["Lists"], security: [{ [BearerAuth.name]: [] }], request: { params: z.object({ listId: ListIdSchema, bookmarkId: BookmarkIdSchema }), diff --git a/packages/open-api/lib/tags.ts b/packages/open-api/lib/tags.ts index e13b7c60..10e49d82 100644 --- a/packages/open-api/lib/tags.ts +++ b/packages/open-api/lib/tags.ts @@ -33,6 +33,7 @@ registry.registerPath({ path: "/tags", description: "Get all tags", summary: "Get all tags", + tags: ["Tags"], security: [{ [BearerAuth.name]: [] }], request: {}, responses: { @@ -54,6 +55,7 @@ registry.registerPath({ path: "/tags/{tagId}", description: "Get tag by its id", summary: "Get a single tag", + tags: ["Tags"], security: [{ [BearerAuth.name]: [] }], request: { params: z.object({ tagId: TagIdSchema }), @@ -75,6 +77,7 @@ registry.registerPath({ path: "/tags/{tagId}", description: "Delete tag by its id", summary: "Delete a tag", + tags: ["Tags"], security: [{ [BearerAuth.name]: [] }], request: { params: z.object({ tagId: TagIdSchema }), @@ -91,6 +94,7 @@ registry.registerPath({ path: "/tags/{tagId}", description: "Update tag by its id", summary: "Update a tag", + tags: ["Tags"], security: [{ [BearerAuth.name]: [] }], request: { params: z.object({ tagId: TagIdSchema }), @@ -121,6 +125,7 @@ registry.registerPath({ path: "/tags/{tagId}/bookmarks", description: "Get the bookmarks with the tag", summary: "Get a bookmarks with the tag", + tags: ["Tags"], security: [{ [BearerAuth.name]: [] }], request: { params: z.object({ tagId: TagIdSchema }), |
