Skip to content

Commit 27eb1af

Browse files
committed
chore: added doc
chore: cleaned up chore: cleaned up chore: cleaned up chore: cleaned up chore: cleaned up chore: cleaned up fix: removed unsupported field fix: removed unsupported field fix: removed unsupported field
1 parent 05d61f7 commit 27eb1af

File tree

9 files changed

+38
-26
lines changed

9 files changed

+38
-26
lines changed

.github/workflows/code_quality.yml

Lines changed: 28 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -23,26 +23,32 @@ jobs:
2323
# run:
2424
# working-directory: ${{ matrix.work_dir }}
2525
steps:
26-
- name: Checkout
27-
uses: actions/checkout@v3
28-
# - name: Start Docker compose containers
26+
- uses: actions/checkout@v4
27+
- uses: subosito/flutter-action@v2
28+
- uses: bluefireteam/melos-action@v3
29+
# - name: Checkout
30+
# uses: actions/checkout@v3
31+
- name: Start Docker compose containers
2932
# if: ${{ matrix.work_dir == 'openapi-generator' }}
30-
# run: docker-compose -f "docker-compose.yaml" up -d --build
31-
- name: Setup Dart
32-
uses: dart-lang/setup-dart@v1.5.0
33-
with:
34-
sdk: stable
35-
- name: Install Melos
36-
run: dart pub global activate melos
37-
- name: Bootstrap Melos
38-
run: melos bootstrap
33+
run: docker-compose -f "docker-compose.yaml" up -d --build
34+
# - name: Setup Dart
35+
# uses: dart-lang/setup-dart@v1
36+
# with:
37+
# sdk: stable
38+
# - name: Setup Flutter
39+
# uses: subosito/flutter-action@v3
40+
# with:
41+
# channel: stable
42+
#
43+
# - name: Install Melos
44+
# run: dart pub global activate melos
45+
# - name: Bootstrap Melos
46+
# run: melos bootstrap
3947
- name: Install Dependencies
4048
run: melos exec -- "dart pub get"
41-
- name: Run Docker Compose on Specific Package
42-
run: |
43-
melos exec -p openapi-generator -- docker-compose -f "docker-compose.yaml" up -d --build
49+
4450
- name: Build runner
45-
run: melos exec -p openapi-generator dart run build_runner build --delete-conflicting-outputs
51+
run: melos exec --scope="openapi-generator" -- dart run build_runner build --delete-conflicting-outputs
4652
- name: Validate formatting
4753
run: melos format --set-exit-if-changed
4854
- name: Run analyzer
@@ -98,6 +104,12 @@ jobs:
98104
- name: Checkout ⬇️
99105
uses: actions/checkout@v3
100106

107+
- name: Setup Java 17
108+
uses: actions/setup-java@v3
109+
with:
110+
distribution: 'temurin'
111+
java-version: '17'
112+
101113
- name: Build Example Project 🛠
102114
uses: subosito/flutter-action@v2
103115
with:

openapi-generator/docker-compose.yaml renamed to docker-compose.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ services:
99
- SERVICES=S3
1010
- AWS_DEFAULT_REGION=us-east-1
1111
volumes:
12-
- './test/specs/localstack:/var/lib/localstack'
13-
- './test/specs/buckets.sh:/etc/localstack/init/ready.d/buckets.sh'
12+
- './openapi-generator/test/specs/localstack:/var/lib/localstack'
13+
- './openapi-generator/test/specs/buckets.sh:/etc/localstack/init/ready.d/buckets.sh'

openapi-generator-annotations/example/example.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import 'package:openapi_generator_annotations/openapi_generator_annotations.dart
22

33
@Openapi(
44
additionalProperties:
5-
AdditionalProperties(pubName: 'petstore_api', pubAuthor: 'Johnny dep'),
5+
AdditionalProperties(pubName: 'petstore_api', pubAuthor: 'Johnny dep.'),
66
inputSpec: InputSpec(path: 'example/openapi-spec.yaml'),
77
generatorName: Generator.dio,
88
outputDirectory: 'api/petstore_api',

openapi-generator/lib/src/models/generator_arguments.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ class GeneratorArguments {
5151
final bool skipValidation;
5252

5353
/// Write the last run placeholder to the annotated file.
54+
/// This makes changes to the file containing @openapi() annotation
55+
/// so that it is executed when next build runner is run
5456
///
5557
/// Default: true
5658
final bool updateAnnotatedFile;

openapi-generator/lib/src/models/output_message.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import 'package:logging/logging.dart';
22

33
/// A message to be displayed to the end user.
44
///
5-
/// Provides a common base shape to report logs to the end user. Also, acts as an
5+
/// Provides a base shape to report logs to the end user. Also, acts as an
66
/// error wrapper.
77
class OutputMessage {
88
final Level level;

openapi-generator/lib/src/openapi_generator_runner.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ class OpenapiGenerator extends GeneratorForAnnotation<annots.Openapi> {
116116
});
117117
}
118118

119-
// Name of the package and path to the CLI script (typically just the package name if it's set up correctly)
119+
// Name of the package and path to the CLI script (typically just the package name if it's set up correctly)
120120
ProcessResult result;
121121
result = await _processRunner.run(
122122
'dart',

openapi-generator/test/output_message_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import 'package:openapi_generator/src/models/output_message.dart';
33
import 'package:test/test.dart';
44

55
void main() {
6-
group('OutputMessage', () {
6+
group('OutputMessage ', () {
77
test('defaults', () {
88
final message = OutputMessage(message: 'message');
99
expect(message.message, 'message');

openapi-generator/test/test_annotations/test_generator.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class TestGenerator extends src_gen.GeneratorForAnnotation<Openapi> {
1212
@override
1313
Iterable<String> generateForAnnotatedElement(Element element,
1414
src_gen.ConstantReader annotation, BuildStep buildStep) sync* {
15-
assert(!annotation.isNull, 'The source generator should\'nt be null');
15+
assert(!annotation.isNull, "The source generator shouldn't be null");
1616

1717
if (element is! ClassElement) {
1818
throw src_gen.InvalidGenerationSourceError(
@@ -42,7 +42,6 @@ class TestGenerator extends src_gen.GeneratorForAnnotation<Openapi> {
4242
SupportedFields(name: 'importMappings', type: Map),
4343
SupportedFields(name: 'reservedWordsMappings', type: Map),
4444
SupportedFields(name: 'inlineSchemaNameMappings', type: Map),
45-
// SupportedFields(name:'inlineSchemaOptions'),
4645
SupportedFields(name: 'apiPackage', type: String),
4746
SupportedFields(name: 'fetchDependencies', type: bool),
4847
SupportedFields(name: 'runSourceGenOnOutput', type: bool),

openapi-generator/test/utils.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@ Future<String> generate(String source, {String path = 'lib/myapp.dart'}) async {
3535
'openapi_generator|$path': '''
3636
import 'package:openapi_generator_annotations/src/openapi_generator_annotations_base.dart';
3737
$source
38-
class MyApp {
39-
}
38+
class MyApp {}
4039
''',
4140
'openapi_generator|openapi-spec.yaml': spec
4241
};

0 commit comments

Comments
 (0)