mirror of
https://github.com/KevinMidboe/immich.git
synced 2025-10-29 17:40:28 +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:
21
mobile/openapi/lib/model/shared_link_edit_dto.dart
generated
21
mobile/openapi/lib/model/shared_link_edit_dto.dart
generated
@@ -79,27 +79,27 @@ class SharedLinkEditDto {
|
||||
if (this.description != null) {
|
||||
json[r'description'] = this.description;
|
||||
} else {
|
||||
// json[r'description'] = null;
|
||||
// json[r'description'] = null;
|
||||
}
|
||||
if (this.expiresAt != null) {
|
||||
json[r'expiresAt'] = this.expiresAt!.toUtc().toIso8601String();
|
||||
} else {
|
||||
// json[r'expiresAt'] = null;
|
||||
// json[r'expiresAt'] = null;
|
||||
}
|
||||
if (this.allowUpload != null) {
|
||||
json[r'allowUpload'] = this.allowUpload;
|
||||
} else {
|
||||
// json[r'allowUpload'] = null;
|
||||
// json[r'allowUpload'] = null;
|
||||
}
|
||||
if (this.allowDownload != null) {
|
||||
json[r'allowDownload'] = this.allowDownload;
|
||||
} else {
|
||||
// json[r'allowDownload'] = null;
|
||||
// json[r'allowDownload'] = null;
|
||||
}
|
||||
if (this.showExif != null) {
|
||||
json[r'showExif'] = this.showExif;
|
||||
} else {
|
||||
// json[r'showExif'] = null;
|
||||
// json[r'showExif'] = null;
|
||||
}
|
||||
return json;
|
||||
}
|
||||
@@ -111,17 +111,6 @@ class SharedLinkEditDto {
|
||||
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 "SharedLinkEditDto[$key]" is missing from JSON.');
|
||||
// assert(json[key] != null, 'Required key "SharedLinkEditDto[$key]" has a null value in JSON.');
|
||||
});
|
||||
return true;
|
||||
}());
|
||||
|
||||
return SharedLinkEditDto(
|
||||
description: mapValueOfType<String>(json, r'description'),
|
||||
expiresAt: mapDateTime(json, r'expiresAt', ''),
|
||||
|
||||
Reference in New Issue
Block a user