Skip to content

High performance self-hosted photo and video management solution.

chore(server): deprecate total field of asset search response (#28551)

Mees Frensel073dcc1fbe07
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),