refactor!: migrate class-validator to zod (#26597)

This commit is contained in:
Timon
2026-04-14 23:39:03 +02:00
committed by GitHub
parent 3753b7a4d1
commit 7d8f843be6
318 changed files with 7830 additions and 8316 deletions
+8 -5
View File
@@ -52,6 +52,9 @@ class UpdateAssetDto {
/// Latitude coordinate
///
/// Minimum value: -90
/// Maximum value: 90
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
@@ -64,6 +67,9 @@ class UpdateAssetDto {
/// Longitude coordinate
///
/// Minimum value: -180
/// Maximum value: 180
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
@@ -75,9 +81,8 @@ class UpdateAssetDto {
///
/// Minimum value: -1
/// Maximum value: 5
num? rating;
int? rating;
/// Asset visibility
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
@@ -172,9 +177,7 @@ class UpdateAssetDto {
latitude: num.parse('${json[r'latitude']}'),
livePhotoVideoId: mapValueOfType<String>(json, r'livePhotoVideoId'),
longitude: num.parse('${json[r'longitude']}'),
rating: json[r'rating'] == null
? null
: num.parse('${json[r'rating']}'),
rating: mapValueOfType<int>(json, r'rating'),
visibility: AssetVisibility.fromJson(json[r'visibility']),
);
}