Skip to content

Commit

Permalink
fix for FF3 swagger models
Browse files Browse the repository at this point in the history
  • Loading branch information
dreautall committed Nov 1, 2023
1 parent 759d038 commit 84a1ff3
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 43 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4753,7 +4753,7 @@ class Attachment {
required this.filename,
required this.downloadUrl,
required this.uploadUrl,
required this.title,
this.title,
this.notes,
required this.mime,
required this.size,
Expand Down Expand Up @@ -4787,7 +4787,7 @@ class Attachment {
@JsonKey(name: 'upload_url', includeIfNull: false)
final String uploadUrl;
@JsonKey(name: 'title', includeIfNull: false)
final String title;
final String? title;
@JsonKey(name: 'notes', includeIfNull: false)
final String? notes;
@JsonKey(name: 'mime', includeIfNull: false)
Expand Down Expand Up @@ -4838,7 +4838,7 @@ extension $AttachmentExtension on Attachment {
Wrapped<String>? filename,
Wrapped<String>? downloadUrl,
Wrapped<String>? uploadUrl,
Wrapped<String>? title,
Wrapped<String?>? title,
Wrapped<String?>? notes,
Wrapped<String>? mime,
Wrapped<int>? size}) {
Expand Down Expand Up @@ -5110,8 +5110,8 @@ class Bill {
required this.amountMin,
required this.amountMax,
required this.date,
required this.endDate,
required this.extensionDate,
this.endDate,
this.extensionDate,
required this.repeatFreq,
required this.skip,
required this.active,
Expand Down Expand Up @@ -5152,9 +5152,9 @@ class Bill {
@JsonKey(name: 'date', includeIfNull: false)
final DateTime date;
@JsonKey(name: 'end_date', includeIfNull: false)
final DateTime endDate;
final DateTime? endDate;
@JsonKey(name: 'extension_date', includeIfNull: false)
final DateTime extensionDate;
final DateTime? extensionDate;
@JsonKey(
name: 'repeat_freq',
includeIfNull: false,
Expand Down Expand Up @@ -5256,8 +5256,8 @@ extension $BillExtension on Bill {
Wrapped<String>? amountMin,
Wrapped<String>? amountMax,
Wrapped<DateTime>? date,
Wrapped<DateTime>? endDate,
Wrapped<DateTime>? extensionDate,
Wrapped<DateTime?>? endDate,
Wrapped<DateTime?>? extensionDate,
Wrapped<enums.BillRepeatFrequency>? repeatFreq,
Wrapped<int>? skip,
Wrapped<bool>? active,
Expand Down Expand Up @@ -6976,8 +6976,8 @@ class PiggyBankEvent {
required this.currencySymbol,
required this.currencyDecimalPlaces,
required this.amount,
required this.transactionJournalId,
required this.transactionGroupId,
this.transactionJournalId,
this.transactionGroupId,
});

factory PiggyBankEvent.fromJson(Map<String, dynamic> json) =>
Expand All @@ -7001,9 +7001,9 @@ class PiggyBankEvent {
@JsonKey(name: 'amount', includeIfNull: false)
final String amount;
@JsonKey(name: 'transaction_journal_id', includeIfNull: false)
final String transactionJournalId;
final String? transactionJournalId;
@JsonKey(name: 'transaction_group_id', includeIfNull: false)
final String transactionGroupId;
final String? transactionGroupId;
static const fromJsonFactory = _$PiggyBankEventFromJson;

@override
Expand Down Expand Up @@ -7042,8 +7042,8 @@ extension $PiggyBankEventExtension on PiggyBankEvent {
Wrapped<String>? currencySymbol,
Wrapped<int>? currencyDecimalPlaces,
Wrapped<String>? amount,
Wrapped<String>? transactionJournalId,
Wrapped<String>? transactionGroupId}) {
Wrapped<String?>? transactionJournalId,
Wrapped<String?>? transactionGroupId}) {
return PiggyBankEvent(
createdAt: (createdAt != null ? createdAt.value : this.createdAt),
updatedAt: (updatedAt != null ? updatedAt.value : this.updatedAt),
Expand Down Expand Up @@ -12249,7 +12249,7 @@ class TransactionSplit {
@JsonKey(name: 'original_source', includeIfNull: false)
final String? originalSource;
@JsonKey(name: 'recurrence_id', includeIfNull: false)
final int? recurrenceId;
final String? recurrenceId;
@JsonKey(name: 'recurrence_total', includeIfNull: false)
final int? recurrenceTotal;
@JsonKey(name: 'recurrence_count', includeIfNull: false)
Expand Down Expand Up @@ -12340,7 +12340,7 @@ extension $TransactionSplitExtension on TransactionSplit {
String? externalId,
String? externalUrl,
String? originalSource,
int? recurrenceId,
String? recurrenceId,
int? recurrenceTotal,
int? recurrenceCount,
String? bunqPaymentId,
Expand Down Expand Up @@ -12469,7 +12469,7 @@ extension $TransactionSplitExtension on TransactionSplit {
Wrapped<String?>? externalId,
Wrapped<String?>? externalUrl,
Wrapped<String?>? originalSource,
Wrapped<int?>? recurrenceId,
Wrapped<String?>? recurrenceId,
Wrapped<int?>? recurrenceTotal,
Wrapped<int?>? recurrenceCount,
Wrapped<String?>? bunqPaymentId,
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions lib/pages/transaction/attachments.dart
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,6 @@ class _AttachmentDialogState extends State<AttachmentDialog>
attributes: Attachment(
attachableType: AttachableType.transactionjournal,
attachableId: "FAKE",
title: file.name,
filename: file.name,
uploadUrl: file.path ?? "",
size: file.size,
Expand Down Expand Up @@ -332,7 +331,7 @@ class _AttachmentDialogState extends State<AttachmentDialog>
: () async => downloadAttachment(context, attachment, i),
),
title: Text(
attachment.attributes.title,
attachment.attributes.title ?? attachment.attributes.filename,
maxLines: 1,
overflow: TextOverflow.ellipsis,
),
Expand Down
9 changes: 7 additions & 2 deletions swagger_input/firefly-iii.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15796,6 +15796,7 @@ components:
type: string
format: string
example: "Some PDF file"
nullable: true
notes:
type: string
format: string
Expand Down Expand Up @@ -15975,11 +15976,13 @@ components:
format: date-time
example: "2018-09-17T12:46:47+01:00"
description: "The date after which this bill is no longer valid or applicable"
nullable: true
extension_date:
type: string
format: date-time
example: "2018-09-17T12:46:47+01:00"
description: "The date before which the bill must be renewed (or cancelled)"
nullable: true
repeat_freq:
$ref: '#/components/schemas/BillRepeatFrequency'
skip:
Expand Down Expand Up @@ -16934,11 +16937,13 @@ components:
format: string
example: "4291"
description: The journal associated with the event.
nullable: true
transaction_group_id:
type: string
format: string
example: "4291"
description: The transaction group associated with the event.
nullable: true
Preference:
type: object
required:
Expand Down Expand Up @@ -19932,9 +19937,9 @@ components:
description: System generated identifier for original creator of transaction.
readOnly: true
recurrence_id:
type: integer
type: string
nullable: true
format: int32
format: string
description: Reference to recurrence that made the transaction.
readOnly: true
recurrence_total:
Expand Down

0 comments on commit 84a1ff3

Please sign in to comment.