diff options
Diffstat (limited to 'packages/open-api/lib/lists.ts')
| -rw-r--r-- | packages/open-api/lib/lists.ts | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/packages/open-api/lib/lists.ts b/packages/open-api/lib/lists.ts index c66acef4..f2c0d954 100644 --- a/packages/open-api/lib/lists.ts +++ b/packages/open-api/lib/lists.ts @@ -12,6 +12,7 @@ import { import { BookmarkIdSchema } from "./bookmarks"; import { BearerAuth } from "./common"; +import { ErrorSchema } from "./errors"; import { PaginatedBookmarksSchema, PaginationSchema } from "./pagination"; export const registry = new OpenAPIRegistry(); @@ -78,6 +79,14 @@ registry.registerPath({ }, }, }, + 400: { + description: "Bad request", + content: { + "application/json": { + schema: ErrorSchema, + }, + }, + }, }, }); registry.registerPath({ @@ -99,6 +108,14 @@ registry.registerPath({ }, }, }, + 404: { + description: "List not found", + content: { + "application/json": { + schema: ErrorSchema, + }, + }, + }, }, }); @@ -116,6 +133,14 @@ registry.registerPath({ 204: { description: "No content - the bookmark was deleted", }, + 404: { + description: "List not found", + content: { + "application/json": { + schema: ErrorSchema, + }, + }, + }, }, }); @@ -147,6 +172,14 @@ registry.registerPath({ }, }, }, + 404: { + description: "List not found", + content: { + "application/json": { + schema: ErrorSchema, + }, + }, + }, }, }); @@ -170,6 +203,14 @@ registry.registerPath({ }, }, }, + 404: { + description: "List not found", + content: { + "application/json": { + schema: ErrorSchema, + }, + }, + }, }, }); @@ -187,6 +228,22 @@ registry.registerPath({ 204: { description: "No content - the bookmark was added", }, + 400: { + description: "Bookmark already in list", + content: { + "application/json": { + schema: ErrorSchema, + }, + }, + }, + 404: { + description: "List or bookmark not found", + content: { + "application/json": { + schema: ErrorSchema, + }, + }, + }, }, }); @@ -204,5 +261,21 @@ registry.registerPath({ 204: { description: "No content - the bookmark was added", }, + 400: { + description: "Bookmark already not in list", + content: { + "application/json": { + schema: ErrorSchema, + }, + }, + }, + 404: { + description: "List or bookmark not found", + content: { + "application/json": { + schema: ErrorSchema, + }, + }, + }, }, }); |
