mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
fix(mobile): omit null values from json requests (#1212)
* chore: initial template * feat: exlude null values * chore: regenerate openapi * chore: merge * feat: store changes in a patch file * feat: extract to sh script * chore: regenerate openapi * chore: remove duplicate file * feat: generate mobile by itself * Fixed number property not decorated correctly * Revert hotfix, fix test * Merge main Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
This commit is contained in:
parent
bd838a71d1
commit
079ee658a5
79 changed files with 890 additions and 557 deletions
124
mobile/openapi/lib/model/exif_response_dto.dart
generated
124
mobile/openapi/lib/model/exif_response_dto.dart
generated
|
|
@ -126,108 +126,108 @@ class ExifResponseDto {
|
|||
String toString() => 'ExifResponseDto[id=$id, fileSizeInByte=$fileSizeInByte, make=$make, model=$model, imageName=$imageName, exifImageWidth=$exifImageWidth, exifImageHeight=$exifImageHeight, orientation=$orientation, dateTimeOriginal=$dateTimeOriginal, modifyDate=$modifyDate, lensModel=$lensModel, fNumber=$fNumber, focalLength=$focalLength, iso=$iso, exposureTime=$exposureTime, latitude=$latitude, longitude=$longitude, city=$city, state=$state, country=$country]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final _json = <String, dynamic>{};
|
||||
if (id != null) {
|
||||
_json[r'id'] = id;
|
||||
final json = <String, dynamic>{};
|
||||
if (this.id != null) {
|
||||
json[r'id'] = this.id;
|
||||
} else {
|
||||
_json[r'id'] = null;
|
||||
// json[r'id'] = null;
|
||||
}
|
||||
if (fileSizeInByte != null) {
|
||||
_json[r'fileSizeInByte'] = fileSizeInByte;
|
||||
if (this.fileSizeInByte != null) {
|
||||
json[r'fileSizeInByte'] = this.fileSizeInByte;
|
||||
} else {
|
||||
_json[r'fileSizeInByte'] = null;
|
||||
// json[r'fileSizeInByte'] = null;
|
||||
}
|
||||
if (make != null) {
|
||||
_json[r'make'] = make;
|
||||
if (this.make != null) {
|
||||
json[r'make'] = this.make;
|
||||
} else {
|
||||
_json[r'make'] = null;
|
||||
// json[r'make'] = null;
|
||||
}
|
||||
if (model != null) {
|
||||
_json[r'model'] = model;
|
||||
if (this.model != null) {
|
||||
json[r'model'] = this.model;
|
||||
} else {
|
||||
_json[r'model'] = null;
|
||||
// json[r'model'] = null;
|
||||
}
|
||||
if (imageName != null) {
|
||||
_json[r'imageName'] = imageName;
|
||||
if (this.imageName != null) {
|
||||
json[r'imageName'] = this.imageName;
|
||||
} else {
|
||||
_json[r'imageName'] = null;
|
||||
// json[r'imageName'] = null;
|
||||
}
|
||||
if (exifImageWidth != null) {
|
||||
_json[r'exifImageWidth'] = exifImageWidth;
|
||||
if (this.exifImageWidth != null) {
|
||||
json[r'exifImageWidth'] = this.exifImageWidth;
|
||||
} else {
|
||||
_json[r'exifImageWidth'] = null;
|
||||
// json[r'exifImageWidth'] = null;
|
||||
}
|
||||
if (exifImageHeight != null) {
|
||||
_json[r'exifImageHeight'] = exifImageHeight;
|
||||
if (this.exifImageHeight != null) {
|
||||
json[r'exifImageHeight'] = this.exifImageHeight;
|
||||
} else {
|
||||
_json[r'exifImageHeight'] = null;
|
||||
// json[r'exifImageHeight'] = null;
|
||||
}
|
||||
if (orientation != null) {
|
||||
_json[r'orientation'] = orientation;
|
||||
if (this.orientation != null) {
|
||||
json[r'orientation'] = this.orientation;
|
||||
} else {
|
||||
_json[r'orientation'] = null;
|
||||
// json[r'orientation'] = null;
|
||||
}
|
||||
if (dateTimeOriginal != null) {
|
||||
_json[r'dateTimeOriginal'] = dateTimeOriginal!.toUtc().toIso8601String();
|
||||
if (this.dateTimeOriginal != null) {
|
||||
json[r'dateTimeOriginal'] = this.dateTimeOriginal!.toUtc().toIso8601String();
|
||||
} else {
|
||||
_json[r'dateTimeOriginal'] = null;
|
||||
// json[r'dateTimeOriginal'] = null;
|
||||
}
|
||||
if (modifyDate != null) {
|
||||
_json[r'modifyDate'] = modifyDate!.toUtc().toIso8601String();
|
||||
if (this.modifyDate != null) {
|
||||
json[r'modifyDate'] = this.modifyDate!.toUtc().toIso8601String();
|
||||
} else {
|
||||
_json[r'modifyDate'] = null;
|
||||
// json[r'modifyDate'] = null;
|
||||
}
|
||||
if (lensModel != null) {
|
||||
_json[r'lensModel'] = lensModel;
|
||||
if (this.lensModel != null) {
|
||||
json[r'lensModel'] = this.lensModel;
|
||||
} else {
|
||||
_json[r'lensModel'] = null;
|
||||
// json[r'lensModel'] = null;
|
||||
}
|
||||
if (fNumber != null) {
|
||||
_json[r'fNumber'] = fNumber;
|
||||
if (this.fNumber != null) {
|
||||
json[r'fNumber'] = this.fNumber;
|
||||
} else {
|
||||
_json[r'fNumber'] = null;
|
||||
// json[r'fNumber'] = null;
|
||||
}
|
||||
if (focalLength != null) {
|
||||
_json[r'focalLength'] = focalLength;
|
||||
if (this.focalLength != null) {
|
||||
json[r'focalLength'] = this.focalLength;
|
||||
} else {
|
||||
_json[r'focalLength'] = null;
|
||||
// json[r'focalLength'] = null;
|
||||
}
|
||||
if (iso != null) {
|
||||
_json[r'iso'] = iso;
|
||||
if (this.iso != null) {
|
||||
json[r'iso'] = this.iso;
|
||||
} else {
|
||||
_json[r'iso'] = null;
|
||||
// json[r'iso'] = null;
|
||||
}
|
||||
if (exposureTime != null) {
|
||||
_json[r'exposureTime'] = exposureTime;
|
||||
if (this.exposureTime != null) {
|
||||
json[r'exposureTime'] = this.exposureTime;
|
||||
} else {
|
||||
_json[r'exposureTime'] = null;
|
||||
// json[r'exposureTime'] = null;
|
||||
}
|
||||
if (latitude != null) {
|
||||
_json[r'latitude'] = latitude;
|
||||
if (this.latitude != null) {
|
||||
json[r'latitude'] = this.latitude;
|
||||
} else {
|
||||
_json[r'latitude'] = null;
|
||||
// json[r'latitude'] = null;
|
||||
}
|
||||
if (longitude != null) {
|
||||
_json[r'longitude'] = longitude;
|
||||
if (this.longitude != null) {
|
||||
json[r'longitude'] = this.longitude;
|
||||
} else {
|
||||
_json[r'longitude'] = null;
|
||||
// json[r'longitude'] = null;
|
||||
}
|
||||
if (city != null) {
|
||||
_json[r'city'] = city;
|
||||
if (this.city != null) {
|
||||
json[r'city'] = this.city;
|
||||
} else {
|
||||
_json[r'city'] = null;
|
||||
// json[r'city'] = null;
|
||||
}
|
||||
if (state != null) {
|
||||
_json[r'state'] = state;
|
||||
if (this.state != null) {
|
||||
json[r'state'] = this.state;
|
||||
} else {
|
||||
_json[r'state'] = null;
|
||||
// json[r'state'] = null;
|
||||
}
|
||||
if (country != null) {
|
||||
_json[r'country'] = country;
|
||||
if (this.country != null) {
|
||||
json[r'country'] = this.country;
|
||||
} else {
|
||||
_json[r'country'] = null;
|
||||
// json[r'country'] = null;
|
||||
}
|
||||
return _json;
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [ExifResponseDto] instance and imports its values from
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue