From 8c114907c15ac9767285d3b485800b236dd690fb Mon Sep 17 00:00:00 2001 From: timonrieger Date: Tue, 2 Jun 2026 00:50:12 +0200 Subject: [PATCH 1/3] regression from #28665 --- mobile/lib/utils/openapi_patching.dart | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mobile/lib/utils/openapi_patching.dart b/mobile/lib/utils/openapi_patching.dart index 38c805a42e75c..71963a75a7215 100644 --- a/mobile/lib/utils/openapi_patching.dart +++ b/mobile/lib/utils/openapi_patching.dart @@ -50,7 +50,11 @@ dynamic upgradeDto(dynamic value, String targetType) { case 'SyncAssetV1': if (value is Map) { addDefault(value, 'isEdited', false); + case 'ServerVersionResponseDto': + if (value is Map) { + addDefault(value, 'prerelease', null); } + break; case 'ServerFeaturesDto': if (value is Map) { addDefault(value, 'ocr', false); From 2b8ff25627a981bce93bda5f4d8f8b426c77d2a3 Mon Sep 17 00:00:00 2001 From: timonrieger Date: Tue, 2 Jun 2026 00:50:37 +0200 Subject: [PATCH 2/3] regression from #28272 --- mobile/lib/utils/openapi_patching.dart | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mobile/lib/utils/openapi_patching.dart b/mobile/lib/utils/openapi_patching.dart index 71963a75a7215..07f025b02176a 100644 --- a/mobile/lib/utils/openapi_patching.dart +++ b/mobile/lib/utils/openapi_patching.dart @@ -50,6 +50,12 @@ dynamic upgradeDto(dynamic value, String targetType) { case 'SyncAssetV1': if (value is Map) { addDefault(value, 'isEdited', false); + addDefault(value, 'createdAt', null); + } + case 'SyncAssetV2': + if (value is Map) { + addDefault(value, 'createdAt', null); + } case 'ServerVersionResponseDto': if (value is Map) { addDefault(value, 'prerelease', null); From d2ba1061f2dd33054512d3e99b9298b3186da407 Mon Sep 17 00:00:00 2001 From: timonrieger Date: Tue, 2 Jun 2026 00:52:47 +0200 Subject: [PATCH 3/3] followup for #24155 The dart generator can't express discriminated unions (see editing.dto.ts) properly, so the flattened class always has "missing" fields from the other variants. --- mobile/lib/utils/openapi_patching.dart | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/mobile/lib/utils/openapi_patching.dart b/mobile/lib/utils/openapi_patching.dart index 07f025b02176a..92a2e3e9d52e9 100644 --- a/mobile/lib/utils/openapi_patching.dart +++ b/mobile/lib/utils/openapi_patching.dart @@ -47,6 +47,16 @@ dynamic upgradeDto(dynamic value, String targetType) { addDefault(value, 'profileChangedAt', DateTime.now().toIso8601String()); addDefault(value, 'hasProfileImage', false); } + case 'AssetEditActionItemDtoParameters': + if (value is Map) { + addDefault(value, 'angle', 0); + addDefault(value, 'x', 0); + addDefault(value, 'y', 0); + addDefault(value, 'width', 0); + addDefault(value, 'height', 0); + addDefault(value, 'axis', 'horizontal'); + } + break; case 'SyncAssetV1': if (value is Map) { addDefault(value, 'isEdited', false);