From 4e06ea7bdbaaa196da5c3e2a755aeefb25cf4228 Mon Sep 17 00:00:00 2001 From: xuatz Date: Mon, 19 May 2025 00:18:58 +0900 Subject: feat(api): enable ?sortOrder= for relevant resources (#1398) * feat(api): enable `?sortOrder=` for relevant resources * fix tests --- packages/open-api/karakeep-openapi-spec.json | 61 ++++++++++++++++++++++++++-- 1 file changed, 57 insertions(+), 4 deletions(-) (limited to 'packages/open-api/karakeep-openapi-spec.json') diff --git a/packages/open-api/karakeep-openapi-spec.json b/packages/open-api/karakeep-openapi-spec.json index 3bdaed54..dbc2e5d0 100644 --- a/packages/open-api/karakeep-openapi-spec.json +++ b/packages/open-api/karakeep-openapi-spec.json @@ -549,6 +549,19 @@ "name": "favourited", "in": "query" }, + { + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ], + "default": "desc" + }, + "required": false, + "name": "sortOrder", + "in": "query" + }, { "schema": { "type": "number" @@ -774,6 +787,20 @@ "name": "q", "in": "query" }, + { + "schema": { + "type": "string", + "enum": [ + "asc", + "desc", + "relevance" + ], + "default": "relevance" + }, + "required": false, + "name": "sortOrder", + "in": "query" + }, { "schema": { "type": "number" @@ -1969,8 +1996,8 @@ }, "/lists/{listId}/bookmarks": { "get": { - "description": "Get the bookmarks in a list", - "summary": "Get a bookmarks in a list", + "description": "Get bookmarks in the list", + "summary": "Get bookmarks in the list", "tags": [ "Lists" ], @@ -1983,6 +2010,19 @@ { "$ref": "#/components/parameters/ListId" }, + { + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ], + "default": "desc" + }, + "required": false, + "name": "sortOrder", + "in": "query" + }, { "schema": { "type": "number" @@ -2367,8 +2407,8 @@ }, "/tags/{tagId}/bookmarks": { "get": { - "description": "Get the bookmarks with the tag", - "summary": "Get a bookmarks with the tag", + "description": "Get bookmarks with the tag", + "summary": "Get bookmarks with the tag", "tags": [ "Tags" ], @@ -2381,6 +2421,19 @@ { "$ref": "#/components/parameters/TagId" }, + { + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ], + "default": "desc" + }, + "required": false, + "name": "sortOrder", + "in": "query" + }, { "schema": { "type": "number" -- cgit v1.2.3-70-g09d2