From 498c6ba87a44ae99b939aed3f2b054c9bd6a87d4 Mon Sep 17 00:00:00 2001 From: Mees Frensel Date: Fri, 22 May 2026 00:04:36 +0200 Subject: [PATCH] chore(server): deprecate total field of asset search response --- mise.toml | 1 - open-api/immich-openapi-specs.json | 9 ++++++++- server/src/dtos/search.dto.ts | 6 +++++- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/mise.toml b/mise.toml index 131067e92e..5f9446fef0 100644 --- a/mise.toml +++ b/mise.toml @@ -73,7 +73,6 @@ run = "bash ./bin/generate-dart-sdk.sh" env = { SHARP_IGNORE_GLOBAL_LIBVIPS = true } run = [ { task = "//:plugins" }, - { task = "//server:build" }, { task = "//server:install" }, { task = "//server:build" }, { task = "//server:sync-open-api" }, diff --git a/open-api/immich-openapi-specs.json b/open-api/immich-openapi-specs.json index badf9ce25d..66d85ad373 100644 --- a/open-api/immich-openapi-specs.json +++ b/open-api/immich-openapi-specs.json @@ -20793,7 +20793,14 @@ "description": "Total number of matching assets", "maximum": 9007199254740991, "minimum": 0, - "type": "integer" + "type": "integer", + "x-immich-history": [ + { + "version": "v3.0.0", + "state": "Deprecated" + } + ], + "x-immich-state": "Deprecated" } }, "required": [ diff --git a/server/src/dtos/search.dto.ts b/server/src/dtos/search.dto.ts index ae5b5e2c8c..c9a92b165f 100644 --- a/server/src/dtos/search.dto.ts +++ b/server/src/dtos/search.dto.ts @@ -186,7 +186,11 @@ const SearchAlbumResponseSchema = z const SearchAssetResponseSchema = z .object({ - total: z.int().min(0).describe('Total number of matching assets'), + total: z + .int() + .min(0) + .describe('Total number of matching assets') + .meta(new HistoryBuilder().deprecated('v3.0.0').getExtensions()), count: z.int().min(0).describe('Number of assets in this page'), items: z.array(AssetResponseSchema), facets: z.array(SearchFacetResponseSchema),