chore(server): auto sort open api spec (#3500)

* chore: recursively sort api keys

* chore: open api
This commit is contained in:
Jason Rasmussen 2023-08-01 12:49:18 -04:00 committed by GitHub
parent 690b87e375
commit 310fab526d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
190 changed files with 6172 additions and 6168 deletions

View file

@ -13,36 +13,20 @@ part of openapi.api;
class SharedLinkResponseDto {
/// Returns a new [SharedLinkResponseDto] instance.
SharedLinkResponseDto({
required this.type,
required this.id,
required this.description,
required this.userId,
required this.key,
required this.createdAt,
required this.expiresAt,
this.assets = const [],
this.album,
required this.allowUpload,
required this.allowDownload,
required this.allowUpload,
this.assets = const [],
required this.createdAt,
required this.description,
required this.expiresAt,
required this.id,
required this.key,
required this.showExif,
required this.type,
required this.userId,
});
SharedLinkType type;
String id;
String? description;
String userId;
String key;
DateTime createdAt;
DateTime? expiresAt;
List<AssetResponseDto> assets;
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
@ -51,72 +35,88 @@ class SharedLinkResponseDto {
///
AlbumResponseDto? album;
bool allowDownload;
bool allowUpload;
bool allowDownload;
List<AssetResponseDto> assets;
DateTime createdAt;
String? description;
DateTime? expiresAt;
String id;
String key;
bool showExif;
SharedLinkType type;
String userId;
@override
bool operator ==(Object other) => identical(this, other) || other is SharedLinkResponseDto &&
other.type == type &&
other.id == id &&
other.description == description &&
other.userId == userId &&
other.key == key &&
other.createdAt == createdAt &&
other.expiresAt == expiresAt &&
other.assets == assets &&
other.album == album &&
other.allowUpload == allowUpload &&
other.allowDownload == allowDownload &&
other.showExif == showExif;
other.allowUpload == allowUpload &&
other.assets == assets &&
other.createdAt == createdAt &&
other.description == description &&
other.expiresAt == expiresAt &&
other.id == id &&
other.key == key &&
other.showExif == showExif &&
other.type == type &&
other.userId == userId;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(type.hashCode) +
(id.hashCode) +
(description == null ? 0 : description!.hashCode) +
(userId.hashCode) +
(key.hashCode) +
(createdAt.hashCode) +
(expiresAt == null ? 0 : expiresAt!.hashCode) +
(assets.hashCode) +
(album == null ? 0 : album!.hashCode) +
(allowUpload.hashCode) +
(allowDownload.hashCode) +
(showExif.hashCode);
(allowUpload.hashCode) +
(assets.hashCode) +
(createdAt.hashCode) +
(description == null ? 0 : description!.hashCode) +
(expiresAt == null ? 0 : expiresAt!.hashCode) +
(id.hashCode) +
(key.hashCode) +
(showExif.hashCode) +
(type.hashCode) +
(userId.hashCode);
@override
String toString() => 'SharedLinkResponseDto[type=$type, id=$id, description=$description, userId=$userId, key=$key, createdAt=$createdAt, expiresAt=$expiresAt, assets=$assets, album=$album, allowUpload=$allowUpload, allowDownload=$allowDownload, showExif=$showExif]';
String toString() => 'SharedLinkResponseDto[album=$album, allowDownload=$allowDownload, allowUpload=$allowUpload, assets=$assets, createdAt=$createdAt, description=$description, expiresAt=$expiresAt, id=$id, key=$key, showExif=$showExif, type=$type, userId=$userId]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'type'] = this.type;
json[r'id'] = this.id;
if (this.description != null) {
json[r'description'] = this.description;
} else {
// json[r'description'] = null;
}
json[r'userId'] = this.userId;
json[r'key'] = this.key;
json[r'createdAt'] = this.createdAt.toUtc().toIso8601String();
if (this.expiresAt != null) {
json[r'expiresAt'] = this.expiresAt!.toUtc().toIso8601String();
} else {
// 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'allowUpload'] = this.allowUpload;
json[r'allowDownload'] = this.allowDownload;
json[r'allowUpload'] = this.allowUpload;
json[r'assets'] = this.assets;
json[r'createdAt'] = this.createdAt.toUtc().toIso8601String();
if (this.description != null) {
json[r'description'] = this.description;
} else {
// json[r'description'] = null;
}
if (this.expiresAt != null) {
json[r'expiresAt'] = this.expiresAt!.toUtc().toIso8601String();
} else {
// json[r'expiresAt'] = null;
}
json[r'id'] = this.id;
json[r'key'] = this.key;
json[r'showExif'] = this.showExif;
json[r'type'] = this.type;
json[r'userId'] = this.userId;
return json;
}
@ -128,18 +128,18 @@ class SharedLinkResponseDto {
final json = value.cast<String, dynamic>();
return SharedLinkResponseDto(
type: SharedLinkType.fromJson(json[r'type'])!,
id: mapValueOfType<String>(json, r'id')!,
description: mapValueOfType<String>(json, r'description'),
userId: mapValueOfType<String>(json, r'userId')!,
key: mapValueOfType<String>(json, r'key')!,
createdAt: mapDateTime(json, r'createdAt', r'')!,
expiresAt: mapDateTime(json, r'expiresAt', r''),
assets: AssetResponseDto.listFromJson(json[r'assets']),
album: AlbumResponseDto.fromJson(json[r'album']),
allowUpload: mapValueOfType<bool>(json, r'allowUpload')!,
allowDownload: mapValueOfType<bool>(json, r'allowDownload')!,
allowUpload: mapValueOfType<bool>(json, r'allowUpload')!,
assets: AssetResponseDto.listFromJson(json[r'assets']),
createdAt: mapDateTime(json, r'createdAt', r'')!,
description: mapValueOfType<String>(json, r'description'),
expiresAt: mapDateTime(json, r'expiresAt', r''),
id: mapValueOfType<String>(json, r'id')!,
key: mapValueOfType<String>(json, r'key')!,
showExif: mapValueOfType<bool>(json, r'showExif')!,
type: SharedLinkType.fromJson(json[r'type'])!,
userId: mapValueOfType<String>(json, r'userId')!,
);
}
return null;
@ -187,17 +187,17 @@ class SharedLinkResponseDto {
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'type',
'id',
'description',
'userId',
'key',
'createdAt',
'expiresAt',
'assets',
'allowUpload',
'allowDownload',
'allowUpload',
'assets',
'createdAt',
'description',
'expiresAt',
'id',
'key',
'showExif',
'type',
'userId',
};
}