Skip to content

Commit

Permalink
Merge pull request #1392 from nextcloud/feat/dynamite/add-generated-b…
Browse files Browse the repository at this point in the history
…y-comment

refactor(dynamite)!: do not name generated libraries
  • Loading branch information
Leptopoda authored Dec 29, 2023
2 parents becf7f6 + f63dd03 commit 3bbf2eb
Show file tree
Hide file tree
Showing 39 changed files with 78 additions and 73 deletions.
4 changes: 2 additions & 2 deletions packages/dynamite/dynamite/example/lib/petstore.openapi.dart
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// OpenAPI client generated by Dynamite. Do not manually edit this file.

// ignore_for_file: camel_case_types, discarded_futures
// ignore_for_file: no_leading_underscores_for_local_identifiers
// ignore_for_file: public_member_api_docs, unreachable_switch_case

library petstore_openapi;

import 'dart:convert';
import 'dart:typed_data';

Expand Down
4 changes: 0 additions & 4 deletions packages/dynamite/dynamite/lib/src/helpers/dart_helpers.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import 'package:source_helper/source_helper.dart';

String toDartName(
final String name, {
final bool uppercaseFirstCharacter = false,
Expand All @@ -24,8 +22,6 @@ String toDartName(
return result;
}

String toLibraryName(final String name) => toDartName(name).snake;

/// Helper methods to work with strings.
extension StringUtils on String {
/// Capitalizes this string.
Expand Down
3 changes: 1 addition & 2 deletions packages/dynamite/dynamite/lib/src/openapi_builder.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import 'package:dynamite/src/builder/generate_ofs.dart';
import 'package:dynamite/src/builder/generate_schemas.dart';
import 'package:dynamite/src/builder/serializer.dart';
import 'package:dynamite/src/builder/state.dart';
import 'package:dynamite/src/helpers/dart_helpers.dart';
import 'package:dynamite/src/helpers/version_checker.dart';
import 'package:dynamite/src/models/config.dart';
import 'package:dynamite/src/models/openapi.dart' as openapi;
Expand Down Expand Up @@ -86,7 +85,7 @@ class OpenAPIBuilder implements Builder {
}

b
..name = toLibraryName(p.basenameWithoutExtension(inputId.path))
..generatedByComment = 'OpenAPI client generated by Dynamite. Do not manually edit this file.'
..directives.addAll([
Directive.import('dart:convert'),
Directive.import('dart:typed_data'),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// OpenAPI client generated by Dynamite. Do not manually edit this file.

// ignore_for_file: camel_case_extensions, camel_case_types, discarded_futures
// ignore_for_file: no_leading_underscores_for_local_identifiers
// ignore_for_file: public_member_api_docs, unreachable_switch_case
// ignore_for_file: unused_element

library all_of_openapi;

import 'package:built_value/built_value.dart';
import 'package:built_value/serializer.dart';
import 'package:built_value/standard_json_plugin.dart';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// OpenAPI client generated by Dynamite. Do not manually edit this file.

// ignore_for_file: camel_case_extensions, camel_case_types, discarded_futures
// ignore_for_file: no_leading_underscores_for_local_identifiers
// ignore_for_file: public_member_api_docs, unreachable_switch_case
// ignore_for_file: unused_element

library any_of_openapi;

import 'package:built_value/built_value.dart';
import 'package:built_value/serializer.dart';
import 'package:built_value/standard_json_plugin.dart';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// OpenAPI client generated by Dynamite. Do not manually edit this file.

// ignore_for_file: camel_case_extensions, camel_case_types, discarded_futures
// ignore_for_file: no_leading_underscores_for_local_identifiers
// ignore_for_file: public_member_api_docs, unreachable_switch_case
// ignore_for_file: unused_element

library enum_openapi;

import 'package:built_collection/built_collection.dart';
import 'package:built_value/built_value.dart';
import 'package:built_value/serializer.dart';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// OpenAPI client generated by Dynamite. Do not manually edit this file.

// ignore_for_file: camel_case_extensions, camel_case_types, discarded_futures
// ignore_for_file: no_leading_underscores_for_local_identifiers
// ignore_for_file: public_member_api_docs, unreachable_switch_case
// ignore_for_file: unused_element

library headers_openapi;

import 'dart:typed_data';

import 'package:built_value/built_value.dart';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// OpenAPI client generated by Dynamite. Do not manually edit this file.

// ignore_for_file: camel_case_extensions, camel_case_types, discarded_futures
// ignore_for_file: no_leading_underscores_for_local_identifiers
// ignore_for_file: public_member_api_docs, unreachable_switch_case
// ignore_for_file: unused_element

library interfaces_openapi;

import 'package:built_value/built_value.dart';
import 'package:built_value/serializer.dart';
import 'package:built_value/standard_json_plugin.dart';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// OpenAPI client generated by Dynamite. Do not manually edit this file.

// ignore_for_file: camel_case_extensions, camel_case_types, discarded_futures
// ignore_for_file: no_leading_underscores_for_local_identifiers
// ignore_for_file: public_member_api_docs, unreachable_switch_case
// ignore_for_file: unused_element

library nested_ofs_openapi;

import 'package:built_value/built_value.dart';
import 'package:built_value/serializer.dart';
import 'package:built_value/standard_json_plugin.dart';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// OpenAPI client generated by Dynamite. Do not manually edit this file.

// ignore_for_file: camel_case_extensions, camel_case_types, discarded_futures
// ignore_for_file: no_leading_underscores_for_local_identifiers
// ignore_for_file: public_member_api_docs, unreachable_switch_case
// ignore_for_file: unused_element

library one_of_openapi;

import 'package:built_value/built_value.dart';
import 'package:built_value/serializer.dart';
import 'package:built_value/standard_json_plugin.dart';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// OpenAPI client generated by Dynamite. Do not manually edit this file.

// ignore_for_file: camel_case_extensions, camel_case_types, discarded_futures
// ignore_for_file: no_leading_underscores_for_local_identifiers
// ignore_for_file: public_member_api_docs, unreachable_switch_case
// ignore_for_file: unused_element

library parameters_openapi;

import 'dart:typed_data';

import 'package:built_collection/built_collection.dart';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// OpenAPI client generated by Dynamite. Do not manually edit this file.

// ignore_for_file: camel_case_extensions, camel_case_types, discarded_futures
// ignore_for_file: no_leading_underscores_for_local_identifiers
// ignore_for_file: public_member_api_docs, unreachable_switch_case
// ignore_for_file: unused_element

library pattern_check_openapi;

import 'package:built_value/built_value.dart';
import 'package:built_value/serializer.dart';
import 'package:built_value/standard_json_plugin.dart';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// OpenAPI client generated by Dynamite. Do not manually edit this file.

// ignore_for_file: camel_case_extensions, camel_case_types, discarded_futures
// ignore_for_file: no_leading_underscores_for_local_identifiers
// ignore_for_file: public_member_api_docs, unreachable_switch_case
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// OpenAPI client generated by Dynamite. Do not manually edit this file.

// ignore_for_file: camel_case_extensions, camel_case_types, discarded_futures
// ignore_for_file: no_leading_underscores_for_local_identifiers
// ignore_for_file: public_member_api_docs, unreachable_switch_case
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// OpenAPI client generated by Dynamite. Do not manually edit this file.

// ignore_for_file: camel_case_extensions, camel_case_types, discarded_futures
// ignore_for_file: no_leading_underscores_for_local_identifiers
// ignore_for_file: public_member_api_docs, unreachable_switch_case
// ignore_for_file: unused_element

library some_of_openapi;

import 'package:built_value/built_value.dart';
import 'package:built_value/serializer.dart';
import 'package:built_value/standard_json_plugin.dart';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// OpenAPI client generated by Dynamite. Do not manually edit this file.

// ignore_for_file: camel_case_extensions, camel_case_types, discarded_futures
// ignore_for_file: no_leading_underscores_for_local_identifiers
// ignore_for_file: public_member_api_docs, unreachable_switch_case
// ignore_for_file: unused_element

library type_defs_openapi;

import 'package:built_value/built_value.dart';
import 'package:built_value/json_object.dart';
import 'package:built_value/serializer.dart';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// OpenAPI client generated by Dynamite. Do not manually edit this file.

// ignore_for_file: camel_case_extensions, camel_case_types, discarded_futures
// ignore_for_file: no_leading_underscores_for_local_identifiers
// ignore_for_file: public_member_api_docs, unreachable_switch_case
// ignore_for_file: unused_element

library types_openapi;

import 'dart:typed_data';

import 'package:built_collection/built_collection.dart';
Expand Down
4 changes: 2 additions & 2 deletions packages/nextcloud/lib/src/api/comments.openapi.dart
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// OpenAPI client generated by Dynamite. Do not manually edit this file.

// ignore_for_file: camel_case_extensions, camel_case_types, discarded_futures
// ignore_for_file: no_leading_underscores_for_local_identifiers
// ignore_for_file: public_member_api_docs, unreachable_switch_case

library comments_openapi;

import 'package:built_value/built_value.dart';
import 'package:built_value/serializer.dart';
import 'package:built_value/standard_json_plugin.dart';
Expand Down
4 changes: 2 additions & 2 deletions packages/nextcloud/lib/src/api/core.openapi.dart
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// OpenAPI client generated by Dynamite. Do not manually edit this file.

// ignore_for_file: camel_case_extensions, camel_case_types, discarded_futures
// ignore_for_file: no_leading_underscores_for_local_identifiers
// ignore_for_file: public_member_api_docs, unreachable_switch_case

library core_openapi;

import 'dart:typed_data';

import 'package:built_collection/built_collection.dart';
Expand Down
4 changes: 2 additions & 2 deletions packages/nextcloud/lib/src/api/dashboard.openapi.dart
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// OpenAPI client generated by Dynamite. Do not manually edit this file.

// ignore_for_file: camel_case_extensions, camel_case_types, discarded_futures
// ignore_for_file: no_leading_underscores_for_local_identifiers
// ignore_for_file: public_member_api_docs, unreachable_switch_case

library dashboard_openapi;

import 'package:built_collection/built_collection.dart';
import 'package:built_value/built_value.dart';
import 'package:built_value/serializer.dart';
Expand Down
4 changes: 2 additions & 2 deletions packages/nextcloud/lib/src/api/dav.openapi.dart
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// OpenAPI client generated by Dynamite. Do not manually edit this file.

// ignore_for_file: camel_case_extensions, camel_case_types, discarded_futures
// ignore_for_file: no_leading_underscores_for_local_identifiers
// ignore_for_file: public_member_api_docs, unreachable_switch_case

library dav_openapi;

import 'package:built_value/built_value.dart';
import 'package:built_value/json_object.dart';
import 'package:built_value/serializer.dart';
Expand Down
4 changes: 2 additions & 2 deletions packages/nextcloud/lib/src/api/files.openapi.dart
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// OpenAPI client generated by Dynamite. Do not manually edit this file.

// ignore_for_file: camel_case_extensions, camel_case_types, discarded_futures
// ignore_for_file: no_leading_underscores_for_local_identifiers
// ignore_for_file: public_member_api_docs, unreachable_switch_case

library files_openapi;

import 'dart:typed_data';

import 'package:built_collection/built_collection.dart';
Expand Down
4 changes: 2 additions & 2 deletions packages/nextcloud/lib/src/api/files_external.openapi.dart
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// OpenAPI client generated by Dynamite. Do not manually edit this file.

// ignore_for_file: camel_case_extensions, camel_case_types, discarded_futures
// ignore_for_file: no_leading_underscores_for_local_identifiers
// ignore_for_file: public_member_api_docs, unreachable_switch_case

library files_external_openapi;

import 'package:built_collection/built_collection.dart';
import 'package:built_value/built_value.dart';
import 'package:built_value/json_object.dart';
Expand Down
4 changes: 2 additions & 2 deletions packages/nextcloud/lib/src/api/files_reminders.openapi.dart
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// OpenAPI client generated by Dynamite. Do not manually edit this file.

// ignore_for_file: camel_case_extensions, camel_case_types, discarded_futures
// ignore_for_file: no_leading_underscores_for_local_identifiers
// ignore_for_file: public_member_api_docs, unreachable_switch_case

library files_reminders_openapi;

import 'package:built_value/built_value.dart';
import 'package:built_value/json_object.dart';
import 'package:built_value/serializer.dart';
Expand Down
4 changes: 2 additions & 2 deletions packages/nextcloud/lib/src/api/files_sharing.openapi.dart
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// OpenAPI client generated by Dynamite. Do not manually edit this file.

// ignore_for_file: camel_case_extensions, camel_case_types, discarded_futures
// ignore_for_file: no_leading_underscores_for_local_identifiers
// ignore_for_file: public_member_api_docs, unreachable_switch_case

library files_sharing_openapi;

import 'dart:typed_data';

import 'package:built_collection/built_collection.dart';
Expand Down
4 changes: 2 additions & 2 deletions packages/nextcloud/lib/src/api/files_trashbin.openapi.dart
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// OpenAPI client generated by Dynamite. Do not manually edit this file.

// ignore_for_file: camel_case_extensions, camel_case_types, discarded_futures
// ignore_for_file: no_leading_underscores_for_local_identifiers
// ignore_for_file: public_member_api_docs, unreachable_switch_case

library files_trashbin_openapi;

import 'dart:typed_data';

import 'package:built_value/built_value.dart';
Expand Down
4 changes: 2 additions & 2 deletions packages/nextcloud/lib/src/api/files_versions.openapi.dart
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// OpenAPI client generated by Dynamite. Do not manually edit this file.

// ignore_for_file: camel_case_extensions, camel_case_types, discarded_futures
// ignore_for_file: no_leading_underscores_for_local_identifiers
// ignore_for_file: public_member_api_docs, unreachable_switch_case

library files_versions_openapi;

import 'dart:typed_data';

import 'package:built_value/built_value.dart';
Expand Down
4 changes: 3 additions & 1 deletion packages/nextcloud/lib/src/api/news.openapi.dart
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
// OpenAPI client generated by Dynamite. Do not manually edit this file.

// ignore_for_file: camel_case_extensions, camel_case_types, discarded_futures
// ignore_for_file: no_leading_underscores_for_local_identifiers
// ignore_for_file: public_member_api_docs, unreachable_switch_case

@experimental
library news_openapi;
library;

import 'package:built_collection/built_collection.dart';
import 'package:built_value/built_value.dart';
Expand Down
4 changes: 3 additions & 1 deletion packages/nextcloud/lib/src/api/notes.openapi.dart
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
// OpenAPI client generated by Dynamite. Do not manually edit this file.

// ignore_for_file: camel_case_extensions, camel_case_types, discarded_futures
// ignore_for_file: no_leading_underscores_for_local_identifiers
// ignore_for_file: public_member_api_docs, unreachable_switch_case

@experimental
library notes_openapi;
library;

import 'dart:convert';
import 'dart:typed_data';
Expand Down
4 changes: 2 additions & 2 deletions packages/nextcloud/lib/src/api/notifications.openapi.dart
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// OpenAPI client generated by Dynamite. Do not manually edit this file.

// ignore_for_file: camel_case_extensions, camel_case_types, discarded_futures
// ignore_for_file: no_leading_underscores_for_local_identifiers
// ignore_for_file: public_member_api_docs, unreachable_switch_case

library notifications_openapi;

import 'package:built_collection/built_collection.dart';
import 'package:built_value/built_value.dart';
import 'package:built_value/json_object.dart';
Expand Down
4 changes: 2 additions & 2 deletions packages/nextcloud/lib/src/api/provisioning_api.openapi.dart
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// OpenAPI client generated by Dynamite. Do not manually edit this file.

// ignore_for_file: camel_case_extensions, camel_case_types, discarded_futures
// ignore_for_file: no_leading_underscores_for_local_identifiers
// ignore_for_file: public_member_api_docs, unreachable_switch_case

library provisioning_api_openapi;

import 'package:built_collection/built_collection.dart';
import 'package:built_value/built_value.dart';
import 'package:built_value/json_object.dart';
Expand Down
4 changes: 2 additions & 2 deletions packages/nextcloud/lib/src/api/settings.openapi.dart
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// OpenAPI client generated by Dynamite. Do not manually edit this file.

// ignore_for_file: camel_case_extensions, camel_case_types, discarded_futures
// ignore_for_file: no_leading_underscores_for_local_identifiers
// ignore_for_file: public_member_api_docs, unreachable_switch_case

library settings_openapi;

import 'dart:typed_data';

import 'package:built_value/built_value.dart';
Expand Down
Loading

0 comments on commit 3bbf2eb

Please sign in to comment.