From 5eb8d7e8b0bc4abdf3cf26065a3a03457544211e Mon Sep 17 00:00:00 2001 From: Alex Tran Date: Wed, 2 Aug 2023 16:10:55 -0500 Subject: [PATCH] update openapi --- cli/src/api/open-api/api.ts | 4 ++-- mobile/openapi/doc/AssetStatsResponseDto.md | 2 +- .../lib/model/asset_stats_response_dto.dart | 22 +++++++++---------- .../test/asset_stats_response_dto_test.dart | 8 +++---- server/immich-openapi-specs.json | 8 +++---- web/src/api/open-api/api.ts | 4 ++-- 6 files changed, 24 insertions(+), 24 deletions(-) diff --git a/cli/src/api/open-api/api.ts b/cli/src/api/open-api/api.ts index e89d2eef51..edee313546 100644 --- a/cli/src/api/open-api/api.ts +++ b/cli/src/api/open-api/api.ts @@ -666,13 +666,13 @@ export interface AssetStatsResponseDto { * @type {number} * @memberof AssetStatsResponseDto */ - 'videos': number; + 'total': number; /** * * @type {number} * @memberof AssetStatsResponseDto */ - 'total': number; + 'videos': number; } /** * diff --git a/mobile/openapi/doc/AssetStatsResponseDto.md b/mobile/openapi/doc/AssetStatsResponseDto.md index d7937a7eda..370b7c059b 100644 --- a/mobile/openapi/doc/AssetStatsResponseDto.md +++ b/mobile/openapi/doc/AssetStatsResponseDto.md @@ -9,8 +9,8 @@ import 'package:openapi/api.dart'; Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **images** | **int** | | -**videos** | **int** | | **total** | **int** | | +**videos** | **int** | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/mobile/openapi/lib/model/asset_stats_response_dto.dart b/mobile/openapi/lib/model/asset_stats_response_dto.dart index 1221712d89..d910917745 100644 --- a/mobile/openapi/lib/model/asset_stats_response_dto.dart +++ b/mobile/openapi/lib/model/asset_stats_response_dto.dart @@ -14,37 +14,37 @@ class AssetStatsResponseDto { /// Returns a new [AssetStatsResponseDto] instance. AssetStatsResponseDto({ required this.images, - required this.videos, required this.total, + required this.videos, }); int images; - int videos; - int total; + int videos; + @override bool operator ==(Object other) => identical(this, other) || other is AssetStatsResponseDto && other.images == images && - other.videos == videos && - other.total == total; + other.total == total && + other.videos == videos; @override int get hashCode => // ignore: unnecessary_parenthesis (images.hashCode) + - (videos.hashCode) + - (total.hashCode); + (total.hashCode) + + (videos.hashCode); @override - String toString() => 'AssetStatsResponseDto[images=$images, videos=$videos, total=$total]'; + String toString() => 'AssetStatsResponseDto[images=$images, total=$total, videos=$videos]'; Map toJson() { final json = {}; json[r'images'] = this.images; - json[r'videos'] = this.videos; json[r'total'] = this.total; + json[r'videos'] = this.videos; return json; } @@ -57,8 +57,8 @@ class AssetStatsResponseDto { return AssetStatsResponseDto( images: mapValueOfType(json, r'images')!, - videos: mapValueOfType(json, r'videos')!, total: mapValueOfType(json, r'total')!, + videos: mapValueOfType(json, r'videos')!, ); } return null; @@ -107,8 +107,8 @@ class AssetStatsResponseDto { /// The list of required keys that must be present in a JSON. static const requiredKeys = { 'images', - 'videos', 'total', + 'videos', }; } diff --git a/mobile/openapi/test/asset_stats_response_dto_test.dart b/mobile/openapi/test/asset_stats_response_dto_test.dart index 3e5d8b548f..eaeace92a7 100644 --- a/mobile/openapi/test/asset_stats_response_dto_test.dart +++ b/mobile/openapi/test/asset_stats_response_dto_test.dart @@ -21,13 +21,13 @@ void main() { // TODO }); - // int videos - test('to test the property `videos`', () async { + // int total + test('to test the property `total`', () async { // TODO }); - // int total - test('to test the property `total`', () async { + // int videos + test('to test the property `videos`', () async { // TODO }); diff --git a/server/immich-openapi-specs.json b/server/immich-openapi-specs.json index 7ddf3bfc6c..53148546d7 100644 --- a/server/immich-openapi-specs.json +++ b/server/immich-openapi-specs.json @@ -4973,15 +4973,14 @@ "type": "object" }, "AssetStatsResponseDto": { - "type": "object", "properties": { "images": { "type": "integer" }, - "videos": { + "total": { "type": "integer" }, - "total": { + "videos": { "type": "integer" } }, @@ -4989,7 +4988,8 @@ "images", "videos", "total" - ] + ], + "type": "object" }, "AssetTypeEnum": { "enum": [ diff --git a/web/src/api/open-api/api.ts b/web/src/api/open-api/api.ts index ef165bd4ba..4cf39af6d5 100644 --- a/web/src/api/open-api/api.ts +++ b/web/src/api/open-api/api.ts @@ -666,13 +666,13 @@ export interface AssetStatsResponseDto { * @type {number} * @memberof AssetStatsResponseDto */ - 'videos': number; + 'total': number; /** * * @type {number} * @memberof AssetStatsResponseDto */ - 'total': number; + 'videos': number; } /** *