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
68
mobile/openapi/lib/model/asset_response_dto.dart
generated
68
mobile/openapi/lib/model/asset_response_dto.dart
generated
|
|
@ -128,54 +128,54 @@ class AssetResponseDto {
|
|||
String toString() => 'AssetResponseDto[type=$type, id=$id, deviceAssetId=$deviceAssetId, ownerId=$ownerId, deviceId=$deviceId, originalPath=$originalPath, resizePath=$resizePath, createdAt=$createdAt, modifiedAt=$modifiedAt, isFavorite=$isFavorite, mimeType=$mimeType, duration=$duration, webpPath=$webpPath, encodedVideoPath=$encodedVideoPath, exifInfo=$exifInfo, smartInfo=$smartInfo, livePhotoVideoId=$livePhotoVideoId, tags=$tags]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final _json = <String, dynamic>{};
|
||||
_json[r'type'] = type;
|
||||
_json[r'id'] = id;
|
||||
_json[r'deviceAssetId'] = deviceAssetId;
|
||||
_json[r'ownerId'] = ownerId;
|
||||
_json[r'deviceId'] = deviceId;
|
||||
_json[r'originalPath'] = originalPath;
|
||||
if (resizePath != null) {
|
||||
_json[r'resizePath'] = resizePath;
|
||||
final json = <String, dynamic>{};
|
||||
json[r'type'] = this.type;
|
||||
json[r'id'] = this.id;
|
||||
json[r'deviceAssetId'] = this.deviceAssetId;
|
||||
json[r'ownerId'] = this.ownerId;
|
||||
json[r'deviceId'] = this.deviceId;
|
||||
json[r'originalPath'] = this.originalPath;
|
||||
if (this.resizePath != null) {
|
||||
json[r'resizePath'] = this.resizePath;
|
||||
} else {
|
||||
_json[r'resizePath'] = null;
|
||||
// json[r'resizePath'] = null;
|
||||
}
|
||||
_json[r'createdAt'] = createdAt;
|
||||
_json[r'modifiedAt'] = modifiedAt;
|
||||
_json[r'isFavorite'] = isFavorite;
|
||||
if (mimeType != null) {
|
||||
_json[r'mimeType'] = mimeType;
|
||||
json[r'createdAt'] = this.createdAt;
|
||||
json[r'modifiedAt'] = this.modifiedAt;
|
||||
json[r'isFavorite'] = this.isFavorite;
|
||||
if (this.mimeType != null) {
|
||||
json[r'mimeType'] = this.mimeType;
|
||||
} else {
|
||||
_json[r'mimeType'] = null;
|
||||
// json[r'mimeType'] = null;
|
||||
}
|
||||
_json[r'duration'] = duration;
|
||||
if (webpPath != null) {
|
||||
_json[r'webpPath'] = webpPath;
|
||||
json[r'duration'] = this.duration;
|
||||
if (this.webpPath != null) {
|
||||
json[r'webpPath'] = this.webpPath;
|
||||
} else {
|
||||
_json[r'webpPath'] = null;
|
||||
// json[r'webpPath'] = null;
|
||||
}
|
||||
if (encodedVideoPath != null) {
|
||||
_json[r'encodedVideoPath'] = encodedVideoPath;
|
||||
if (this.encodedVideoPath != null) {
|
||||
json[r'encodedVideoPath'] = this.encodedVideoPath;
|
||||
} else {
|
||||
_json[r'encodedVideoPath'] = null;
|
||||
// json[r'encodedVideoPath'] = null;
|
||||
}
|
||||
if (exifInfo != null) {
|
||||
_json[r'exifInfo'] = exifInfo;
|
||||
if (this.exifInfo != null) {
|
||||
json[r'exifInfo'] = this.exifInfo;
|
||||
} else {
|
||||
_json[r'exifInfo'] = null;
|
||||
// json[r'exifInfo'] = null;
|
||||
}
|
||||
if (smartInfo != null) {
|
||||
_json[r'smartInfo'] = smartInfo;
|
||||
if (this.smartInfo != null) {
|
||||
json[r'smartInfo'] = this.smartInfo;
|
||||
} else {
|
||||
_json[r'smartInfo'] = null;
|
||||
// json[r'smartInfo'] = null;
|
||||
}
|
||||
if (livePhotoVideoId != null) {
|
||||
_json[r'livePhotoVideoId'] = livePhotoVideoId;
|
||||
if (this.livePhotoVideoId != null) {
|
||||
json[r'livePhotoVideoId'] = this.livePhotoVideoId;
|
||||
} else {
|
||||
_json[r'livePhotoVideoId'] = null;
|
||||
// json[r'livePhotoVideoId'] = null;
|
||||
}
|
||||
_json[r'tags'] = tags;
|
||||
return _json;
|
||||
json[r'tags'] = this.tags;
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [AssetResponseDto] instance and imports its values from
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue