Skip to content

Commit 1a5f2f8

Browse files
committed
chore: removed logs
1 parent 321c4d1 commit 1a5f2f8

File tree

5 files changed

+23
-8
lines changed

5 files changed

+23
-8
lines changed

openapi-generator-annotations/lib/src/openapi_generator_annotations_base.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ class Openapi {
2525

2626
/// folder containing the template files
2727
///
28+
/// You can read more about templating here
29+
/// https://github.com/OpenAPITools/openapi-generator/blob/master/docs/templating.md
2830
/// -t
2931
final String? templateDirectory;
3032

openapi-generator/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 4.11.0+1
2+
3+
- Removed ```log.severe``` that shows event though generation is successful
4+
- Updated documentation
5+
16
## 4.11.0
27

38
- Bumped dart-ogurets (_dioAlt_) generator to 7.2

openapi-generator/README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,16 @@ library packages in the generated source.
7272

7373
## FAQ
7474

75-
Q: I run source gen (`flutter pub run build_runner build --delete-conflicting-outputs`), The api generator doesnot run.
75+
Q: I run source gen (`flutter pub run build_runner build --delete-conflicting-outputs`), The api generator does not run.
7676

7777
A: The source generator of flutter only runs when there are changes to the file that has the annotation. If this ever
7878
happens, just go to the file that has the `@openapi` annotation and edit something in the file.
7979

80+
Q: How do I prevent files from being generated e.g tests
81+
82+
A: To prevent any files from being generated, you need to add it to ```.openapi-generator-ignore```. This file is in the
83+
root of the generated code. For example, to prevent generating tests, add ```test/*``` to the file.
84+
8085
## Features and bugs
8186

8287
Please file feature requests and bugs at the [issue tracker][tracker].

openapi-generator/lib/src/openapi_generator_runner.dart

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,10 @@ class OpenapiGenerator extends GeneratorForAnnotation<annots.Openapi> {
2020
@override
2121
FutureOr<String> generateForAnnotatedElement(
2222
Element element, ConstantReader annotation, BuildStep buildStep) async {
23-
log.info(' - :::::::::::::::::::::::::::::::::::::::::::');
24-
log.info(' - :: Openapi generator for dart ::');
25-
log.info(' - :::::::::::::::::::::::::::::::::::::::::::');
23+
var line1 = ' - :::::::::::::::::::::::::::::::::::::::::::';
24+
var line2 = ' - :: Openapi generator for dart ::';
25+
var line3 = ' - :::::::::::::::::::::::::::::::::::::::::::';
26+
print('$line1\n$line2\n$line3');
2627

2728
try {
2829
if (element is! ClassElement) {
@@ -149,9 +150,12 @@ class OpenapiGenerator extends GeneratorForAnnotation<annots.Openapi> {
149150
await runSourceGen(annotation, outputDirectory);
150151
if (runnerOutput.exitCode != 0) {
151152
log.severe(runnerOutput.stderr);
153+
log.severe(
154+
' :: build runner exited with code ${runnerOutput.exitCode} ::');
155+
} else {
156+
log.info(
157+
' :: build runner exited with code ${runnerOutput.exitCode} ::');
152158
}
153-
log.info(
154-
' :: build runner exited with code ${runnerOutput.exitCode} ::');
155159
} catch (e) {
156160
log.severe(e);
157161
log.severe(' :: could not complete source gen ::');
@@ -175,7 +179,6 @@ class OpenapiGenerator extends GeneratorForAnnotation<annots.Openapi> {
175179
ProcessResult runnerOutput;
176180
runnerOutput = await Process.run(command.executable, command.arguments,
177181
runInShell: Platform.isWindows, workingDirectory: '$outputDirectory');
178-
log.severe(runnerOutput.stderr);
179182
return runnerOutput;
180183
}
181184

openapi-generator/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: openapi_generator
22
description: Generator for openapi client sdk inspired by the npm implementation of openapi-generator-cli.
3-
version: 4.11.0
3+
version: 4.11.0+1
44
homepage: https://github.com/gibahjoe/openapi-generator-dart
55

66
environment:

0 commit comments

Comments
 (0)