Browse Source

Merge pull request #155 from provokateurin/fix/enum-from-value

dynamite,nextcloud: Fix enum fromValue exceptions
pull/156/head
Kate 2 years ago committed by GitHub
parent
commit
c751153f7d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      packages/dynamite/lib/src/openapi_builder.dart
  2. 8
      packages/nextcloud/lib/src/nextcloud.openapi.dart

2
packages/dynamite/lib/src/openapi_builder.dart

@ -1548,7 +1548,7 @@ TypeResult resolveType(
'return $identifier.${_toDartName(value.toString())};',
],
'default:',
'throw Exception(\'Can not parse UserStatusClearAtTime0 from "\$value"\');',
'throw Exception(\'Can not parse $identifier from "\$value"\');',
'}',
].join(),
),

8
packages/nextcloud/lib/src/nextcloud.openapi.dart

@ -3312,7 +3312,7 @@ enum NotesSettings_NoteMode {
case 'preview':
return NotesSettings_NoteMode.preview;
default:
throw Exception('Can not parse UserStatusClearAtTime0 from "$value"');
throw Exception('Can not parse NotesSettings_NoteMode from "$value"');
}
}
}
@ -3949,7 +3949,7 @@ enum UserStatusClearAt_Type {
case 'end-of':
return UserStatusClearAt_Type.endOf;
default:
throw Exception('Can not parse UserStatusClearAtTime0 from "$value"');
throw Exception('Can not parse UserStatusClearAt_Type from "$value"');
}
}
}
@ -3969,7 +3969,7 @@ enum UserStatusClearAt_Time0 {
case 'week':
return UserStatusClearAt_Time0.week;
default:
throw Exception('Can not parse UserStatusClearAtTime0 from "$value"');
throw Exception('Can not parse UserStatusClearAt_Time0 from "$value"');
}
}
}
@ -4101,7 +4101,7 @@ enum UserStatusType {
case 'invisible':
return UserStatusType.invisible;
default:
throw Exception('Can not parse UserStatusClearAtTime0 from "$value"');
throw Exception('Can not parse UserStatusType from "$value"');
}
}
}

Loading…
Cancel
Save