chore: generate open-api specs

This commit is contained in:
Diogo Correia 2026-07-18 19:16:56 +01:00
parent 910e4b6708
commit b4302ee99c
No known key found for this signature in database
GPG key ID: 12B4F3AC9C065D08
3 changed files with 24 additions and 1 deletions

View file

@ -13,10 +13,20 @@ part of openapi.api;
class DownloadArchiveDto {
/// Returns a new [DownloadArchiveDto] instance.
DownloadArchiveDto({
this.archiveName = const Optional.absent(),
this.assetIds = const [],
this.edited = const Optional.absent(),
});
/// The name of the archive to download, without extension
///
/// 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
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
Optional<String?> archiveName;
/// Asset IDs
List<String> assetIds;
@ -31,20 +41,26 @@ class DownloadArchiveDto {
@override
bool operator ==(Object other) => identical(this, other) || other is DownloadArchiveDto &&
other.archiveName == archiveName &&
_deepEquality.equals(other.assetIds, assetIds) &&
other.edited == edited;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(archiveName == null ? 0 : archiveName!.hashCode) +
(assetIds.hashCode) +
(edited == null ? 0 : edited!.hashCode);
@override
String toString() => 'DownloadArchiveDto[assetIds=$assetIds, edited=$edited]';
String toString() => 'DownloadArchiveDto[archiveName=$archiveName, assetIds=$assetIds, edited=$edited]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (this.archiveName.isPresent) {
final value = this.archiveName.value;
json[r'archiveName'] = value;
}
json[r'assetIds'] = this.assetIds;
if (this.edited.isPresent) {
final value = this.edited.value;
@ -62,6 +78,7 @@ class DownloadArchiveDto {
final json = value.cast<String, dynamic>();
return DownloadArchiveDto(
archiveName: json.containsKey(r'archiveName') ? Optional.present(mapValueOfType<String>(json, r'archiveName')) : const Optional.absent(),
assetIds: json[r'assetIds'] is Iterable
? (json[r'assetIds'] as Iterable).cast<String>().toList(growable: false)
: const [],

View file

@ -18650,6 +18650,10 @@
},
"DownloadArchiveDto": {
"properties": {
"archiveName": {
"description": "The name of the archive to download, without extension",
"type": "string"
},
"assetIds": {
"description": "Asset IDs",
"items": {

View file

@ -1114,6 +1114,8 @@ export type ValidateAccessTokenResponseDto = {
authStatus: boolean;
};
export type DownloadArchiveDto = {
/** The name of the archive to download, without extension */
archiveName?: string;
/** Asset IDs */
assetIds: string[];
/** Download edited asset if available */