Browse Source

nextcloud,tool: Put dynamite output under static analysis

pull/247/head
jld3103 2 years ago
parent
commit
f9eb190337
No known key found for this signature in database
GPG Key ID: 9062417B9E8EB7B3
  1. 4
      packages/nextcloud/analysis_options.yaml
  2. 1986
      packages/nextcloud/lib/src/nextcloud.openapi.dart
  3. 58
      packages/nextcloud/lib/src/nextcloud.openapi.g.dart
  4. 7
      tool/generate-nextcloud.sh

4
packages/nextcloud/analysis_options.yaml

@ -1,5 +1 @@
include: package:nit_picking/dart.yaml include: package:nit_picking/dart.yaml
analyzer:
exclude:
- 'lib/src/**.openapi.**'

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

File diff suppressed because it is too large Load Diff

58
packages/nextcloud/lib/src/nextcloud.openapi.g.dart

@ -1270,16 +1270,9 @@ NextcloudNewsArticle _$NextcloudNewsArticleFromJson(Map<String, dynamic> json) {
id: json['id'] as int, id: json['id'] as int,
guid: json['guid'] as String, guid: json['guid'] as String,
guidHash: json['guidHash'] as String, guidHash: json['guidHash'] as String,
url: json['url'] as String?,
title: json['title'] as String, title: json['title'] as String,
author: json['author'] as String?,
pubDate: json['pubDate'] as int, pubDate: json['pubDate'] as int,
updatedDate: json['updatedDate'] as int?,
body: json['body'] as String, body: json['body'] as String,
enclosureMime: json['enclosureMime'] as String?,
enclosureLink: json['enclosureLink'] as String?,
mediaThumbnail: json['mediaThumbnail'] as String?,
mediaDescription: json['mediaDescription'] as String?,
feedId: json['feedId'] as int, feedId: json['feedId'] as int,
unread: json['unread'] as bool, unread: json['unread'] as bool,
starred: json['starred'] as bool, starred: json['starred'] as bool,
@ -1287,6 +1280,13 @@ NextcloudNewsArticle _$NextcloudNewsArticleFromJson(Map<String, dynamic> json) {
rtl: json['rtl'] as bool, rtl: json['rtl'] as bool,
fingerprint: json['fingerprint'] as String, fingerprint: json['fingerprint'] as String,
contentHash: json['contentHash'] as String, contentHash: json['contentHash'] as String,
url: json['url'] as String?,
author: json['author'] as String?,
updatedDate: json['updatedDate'] as int?,
enclosureMime: json['enclosureMime'] as String?,
enclosureLink: json['enclosureLink'] as String?,
mediaThumbnail: json['mediaThumbnail'] as String?,
mediaDescription: json['mediaDescription'] as String?,
); );
} }
@ -1336,17 +1336,17 @@ NextcloudNewsFeed _$NextcloudNewsFeedFromJson(Map<String, dynamic> json) {
id: json['id'] as int, id: json['id'] as int,
url: json['url'] as String, url: json['url'] as String,
title: json['title'] as String, title: json['title'] as String,
faviconLink: json['faviconLink'] as String?,
added: json['added'] as int, added: json['added'] as int,
folderId: json['folderId'] as int?,
unreadCount: json['unreadCount'] as int?,
ordering: json['ordering'] as int, ordering: json['ordering'] as int,
link: json['link'] as String?,
pinned: json['pinned'] as bool, pinned: json['pinned'] as bool,
updateErrorCount: json['updateErrorCount'] as int, updateErrorCount: json['updateErrorCount'] as int,
lastUpdateError: json['lastUpdateError'] as String?,
items: items:
(json['items'] as List<dynamic>).map((e) => NextcloudNewsArticle.fromJson(e as Map<String, dynamic>)).toList(), (json['items'] as List<dynamic>).map((e) => NextcloudNewsArticle.fromJson(e as Map<String, dynamic>)).toList(),
faviconLink: json['faviconLink'] as String?,
folderId: json['folderId'] as int?,
unreadCount: json['unreadCount'] as int?,
link: json['link'] as String?,
lastUpdateError: json['lastUpdateError'] as String?,
); );
} }
@ -1407,9 +1407,9 @@ NextcloudNewsListFeeds _$NextcloudNewsListFeedsFromJson(Map<String, dynamic> jso
allowedKeys: const ['starredCount', 'newestItemId', 'feeds'], allowedKeys: const ['starredCount', 'newestItemId', 'feeds'],
); );
return NextcloudNewsListFeeds( return NextcloudNewsListFeeds(
feeds: (json['feeds'] as List<dynamic>).map((e) => NextcloudNewsFeed.fromJson(e as Map<String, dynamic>)).toList(),
starredCount: json['starredCount'] as int?, starredCount: json['starredCount'] as int?,
newestItemId: json['newestItemId'] as int?, newestItemId: json['newestItemId'] as int?,
feeds: (json['feeds'] as List<dynamic>).map((e) => NextcloudNewsFeed.fromJson(e as Map<String, dynamic>)).toList(),
); );
} }
@ -1835,20 +1835,21 @@ NextcloudProvisioningApiUserDetails _$NextcloudProvisioningApiUserDetailsFromJso
], ],
); );
return NextcloudProvisioningApiUserDetails( return NextcloudProvisioningApiUserDetails(
enabled: json['enabled'] as bool?, displaynameScope: json['displaynameScope'] as String,
storageLocation: json['storageLocation'] as String?, backendCapabilities: NextcloudProvisioningApiUserDetails_BackendCapabilities.fromJson(
json['backendCapabilities'] as Map<String, dynamic>),
id: json['id'] as String, id: json['id'] as String,
lastLogin: json['lastLogin'] as int, lastLogin: json['lastLogin'] as int,
backend: json['backend'] as String, backend: json['backend'] as String,
subadmin: (json['subadmin'] as List<dynamic>).map((e) => e as String).toList(), subadmin: (json['subadmin'] as List<dynamic>).map((e) => e as String).toList(),
quota: NextcloudProvisioningApiUserDetails_Quota.fromJson(json['quota'] as Map<String, dynamic>), quota: NextcloudProvisioningApiUserDetails_Quota.fromJson(json['quota'] as Map<String, dynamic>),
avatarScope: json['avatarScope'] as String, avatarScope: json['avatarScope'] as String,
email: json['email'] as String?, locale: json['locale'] as String,
emailScope: json['emailScope'] as String, emailScope: json['emailScope'] as String,
additionalMail: (json['additional_mail'] as List<dynamic>).map((e) => e as String).toList(), additionalMail: (json['additional_mail'] as List<dynamic>).map((e) => e as String).toList(),
additionalMailScope: (json['additional_mailScope'] as List<dynamic>).map((e) => e as String).toList(), additionalMailScope: (json['additional_mailScope'] as List<dynamic>).map((e) => e as String).toList(),
displayname: json['displayname'] as String?, language: json['language'] as String,
displaynameScope: json['displaynameScope'] as String, groups: (json['groups'] as List<dynamic>).map((e) => e as String).toList(),
phone: json['phone'] as String, phone: json['phone'] as String,
phoneScope: json['phoneScope'] as String, phoneScope: json['phoneScope'] as String,
address: json['address'] as String, address: json['address'] as String,
@ -1860,7 +1861,7 @@ NextcloudProvisioningApiUserDetails _$NextcloudProvisioningApiUserDetailsFromJso
organisation: json['organisation'] as String, organisation: json['organisation'] as String,
organisationScope: json['organisationScope'] as String, organisationScope: json['organisationScope'] as String,
role: json['role'] as String, role: json['role'] as String,
roleScope: json['roleScope'] as String, fediverseScope: json['fediverseScope'] as String,
headline: json['headline'] as String, headline: json['headline'] as String,
headlineScope: json['headlineScope'] as String, headlineScope: json['headlineScope'] as String,
biography: json['biography'] as String, biography: json['biography'] as String,
@ -1868,13 +1869,12 @@ NextcloudProvisioningApiUserDetails _$NextcloudProvisioningApiUserDetailsFromJso
profileEnabled: json['profile_enabled'] as String, profileEnabled: json['profile_enabled'] as String,
profileEnabledScope: json['profile_enabledScope'] as String, profileEnabledScope: json['profile_enabledScope'] as String,
fediverse: json['fediverse'] as String, fediverse: json['fediverse'] as String,
fediverseScope: json['fediverseScope'] as String, roleScope: json['roleScope'] as String,
groups: (json['groups'] as List<dynamic>).map((e) => e as String).toList(), enabled: json['enabled'] as bool?,
language: json['language'] as String, displayname: json['displayname'] as String?,
locale: json['locale'] as String, email: json['email'] as String?,
notifyEmail: json['notify_email'] as String?, notifyEmail: json['notify_email'] as String?,
backendCapabilities: NextcloudProvisioningApiUserDetails_BackendCapabilities.fromJson( storageLocation: json['storageLocation'] as String?,
json['backendCapabilities'] as Map<String, dynamic>),
displayName: json['display-name'] as String?, displayName: json['display-name'] as String?,
); );
} }
@ -2211,10 +2211,10 @@ NextcloudUserStatusPublicStatus _$NextcloudUserStatusPublicStatusFromJson(Map<St
); );
return NextcloudUserStatusPublicStatus( return NextcloudUserStatusPublicStatus(
userId: json['userId'] as String, userId: json['userId'] as String,
status: $enumDecode(_$NextcloudUserStatusTypeEnumMap, json['status']),
message: json['message'] as String?, message: json['message'] as String?,
icon: json['icon'] as String?, icon: json['icon'] as String?,
clearAt: json['clearAt'] == null ? null : NextcloudUserStatusPublicStatus_ClearAt.fromJson(json['clearAt']), clearAt: json['clearAt'] == null ? null : NextcloudUserStatusPublicStatus_ClearAt.fromJson(json['clearAt']),
status: $enumDecode(_$NextcloudUserStatusTypeEnumMap, json['status']),
); );
} }
@ -2318,13 +2318,13 @@ NextcloudUserStatusStatus _$NextcloudUserStatusStatusFromJson(Map<String, dynami
); );
return NextcloudUserStatusStatus( return NextcloudUserStatusStatus(
userId: json['userId'] as String, userId: json['userId'] as String,
messageIsPredefined: json['messageIsPredefined'] as bool,
status: $enumDecode(_$NextcloudUserStatusTypeEnumMap, json['status']),
statusIsUserDefined: json['statusIsUserDefined'] as bool,
message: json['message'] as String?, message: json['message'] as String?,
messageId: json['messageId'] as String?, messageId: json['messageId'] as String?,
messageIsPredefined: json['messageIsPredefined'] as bool,
icon: json['icon'] as String?, icon: json['icon'] as String?,
clearAt: json['clearAt'] == null ? null : NextcloudUserStatusStatus_ClearAt.fromJson(json['clearAt']), clearAt: json['clearAt'] == null ? null : NextcloudUserStatusStatus_ClearAt.fromJson(json['clearAt']),
status: $enumDecode(_$NextcloudUserStatusTypeEnumMap, json['status']),
statusIsUserDefined: json['statusIsUserDefined'] as bool,
); );
} }

7
tool/generate-nextcloud.sh

@ -63,6 +63,9 @@ jq \
cd packages/nextcloud cd packages/nextcloud
rm -rf .dart_tool/build rm -rf .dart_tool/build
fvm dart pub run build_runner build --delete-conflicting-outputs fvm dart pub run build_runner build --delete-conflicting-outputs
# For some reason we need to fix and format twice, otherwise not everything gets fixed
fvm dart fix --apply lib/src/nextcloud.openapi.dart
../../tool/format.sh
fvm dart fix --apply lib/src/nextcloud.openapi.dart
../../tool/format.sh
) )
./tool/format.sh

Loading…
Cancel
Save