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
|
|
@ -98,7 +98,7 @@ class SharedLinkResponseDto {
|
|||
if (this.description != null) {
|
||||
json[r'description'] = this.description;
|
||||
} else {
|
||||
// json[r'description'] = null;
|
||||
// json[r'description'] = null;
|
||||
}
|
||||
json[r'userId'] = this.userId;
|
||||
json[r'key'] = this.key;
|
||||
|
|
@ -106,13 +106,13 @@ class SharedLinkResponseDto {
|
|||
if (this.expiresAt != null) {
|
||||
json[r'expiresAt'] = this.expiresAt!.toUtc().toIso8601String();
|
||||
} else {
|
||||
// json[r'expiresAt'] = null;
|
||||
// json[r'expiresAt'] = null;
|
||||
}
|
||||
json[r'assets'] = this.assets;
|
||||
if (this.album != null) {
|
||||
json[r'album'] = this.album;
|
||||
} else {
|
||||
// json[r'album'] = null;
|
||||
// json[r'album'] = null;
|
||||
}
|
||||
json[r'allowUpload'] = this.allowUpload;
|
||||
json[r'allowDownload'] = this.allowDownload;
|
||||
|
|
@ -127,17 +127,6 @@ class SharedLinkResponseDto {
|
|||
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 "SharedLinkResponseDto[$key]" is missing from JSON.');
|
||||
// assert(json[key] != null, 'Required key "SharedLinkResponseDto[$key]" has a null value in JSON.');
|
||||
});
|
||||
return true;
|
||||
}());
|
||||
|
||||
return SharedLinkResponseDto(
|
||||
type: SharedLinkType.fromJson(json[r'type'])!,
|
||||
id: mapValueOfType<String>(json, r'id')!,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue