mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
chore/remove openapi assertion for dart 2 (#2916)
* chore(server): patch dart openapi assertion 2 * removed usused file
This commit is contained in:
parent
4311d385fc
commit
751922990f
93 changed files with 99 additions and 1102 deletions
19
mobile/openapi/lib/model/import_asset_dto.dart
generated
19
mobile/openapi/lib/model/import_asset_dto.dart
generated
|
|
@ -117,7 +117,7 @@ class ImportAssetDto {
|
|||
if (this.sidecarPath != null) {
|
||||
json[r'sidecarPath'] = this.sidecarPath;
|
||||
} else {
|
||||
// json[r'sidecarPath'] = null;
|
||||
// json[r'sidecarPath'] = null;
|
||||
}
|
||||
json[r'deviceAssetId'] = this.deviceAssetId;
|
||||
json[r'deviceId'] = this.deviceId;
|
||||
|
|
@ -127,17 +127,17 @@ class ImportAssetDto {
|
|||
if (this.isArchived != null) {
|
||||
json[r'isArchived'] = this.isArchived;
|
||||
} else {
|
||||
// json[r'isArchived'] = null;
|
||||
// json[r'isArchived'] = null;
|
||||
}
|
||||
if (this.isVisible != null) {
|
||||
json[r'isVisible'] = this.isVisible;
|
||||
} else {
|
||||
// json[r'isVisible'] = null;
|
||||
// json[r'isVisible'] = null;
|
||||
}
|
||||
if (this.duration != null) {
|
||||
json[r'duration'] = this.duration;
|
||||
} else {
|
||||
// json[r'duration'] = null;
|
||||
// json[r'duration'] = null;
|
||||
}
|
||||
return json;
|
||||
}
|
||||
|
|
@ -149,17 +149,6 @@ class ImportAssetDto {
|
|||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
// Ensure that the map contains the required keys.
|
||||
// Note 1: the values aren't checked for validity beyond being non-null.
|
||||
// Note 2: this code is stripped in release mode!
|
||||
assert(() {
|
||||
requiredKeys.forEach((key) {
|
||||
assert(json.containsKey(key), 'Required key "ImportAssetDto[$key]" is missing from JSON.');
|
||||
// assert(json[key] != null, 'Required key "ImportAssetDto[$key]" has a null value in JSON.');
|
||||
});
|
||||
return true;
|
||||
}());
|
||||
|
||||
return ImportAssetDto(
|
||||
assetType: AssetTypeEnum.fromJson(json[r'assetType'])!,
|
||||
isReadOnly: mapValueOfType<bool>(json, r'isReadOnly') ?? true,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue