Skip to content

Commit 68382b9

Browse files
committed
chore(generator): fixed analysis issues
1 parent 4a8c843 commit 68382b9

File tree

3 files changed

+5
-13
lines changed

3 files changed

+5
-13
lines changed

openapi-generator-cli/test/openapi_generator_cli_test.dart

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,6 @@ void main() {
7272
await file.writeAsString('existing file content');
7373
final mockClient = MockClient((request) async {
7474
fail('HTTP client should not be called when file exists');
75-
return http.Response.bytes(
76-
List<int>.filled(1024, 1), 200); // 1 KB of dummy data
7775
});
7876
http.Client client = mockClient;
7977
await downloadJar(constructJarUrl('test'), jarFilePath, client: client);
@@ -84,12 +82,6 @@ void main() {
8482

8583
test('executeWithClasspath runs the process with all JARs in the classpath',
8684
() async {
87-
// Mock the HTTP client to avoid real network calls
88-
final mockClient = MockClient((request) async {
89-
return http.Response.bytes(
90-
List<int>.filled(1024, 1), 200); // 1 KB of dummy data
91-
});
92-
9385
final jarPaths = [jarFilePath, customJarFilePath];
9486
final args = <String>[];
9587
final javaOpts = Platform.environment['JAVA_OPTS'] ?? '';

openapi-generator/test/github_issues_test.dart

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ void main() {
2323
// });
2424
group('#137', () {
2525
var parentFolder = path.join(testSpecPath, 'issue', '137');
26-
var workingDirectory = path.join(parentFolder, 'output');
2726
setUpAll(
2827
() {
2928
var workingDirectory = path.join(parentFolder, 'output');
@@ -34,7 +33,7 @@ void main() {
3433
() async {
3534
var annotatedFile =
3635
File('$parentFolder/github_issue_137_test_config.dart');
37-
var annotatedFileContents = annotatedFile.readAsStringSync();
36+
// var annotatedFileContents = annotatedFile.readAsStringSync();
3837
var inputSpecFile = File('$parentFolder/github_issue_#137.yaml');
3938
// final annotations = (await resolveSource(
4039
// annotatedFileContents,
@@ -45,7 +44,7 @@ void main() {
4544
// .map((e) => ConstantReader(e.computeConstantValue()!))
4645
// .first;
4746
// final args = GeneratorArguments(annotations: annotations);
48-
var generatedOutput = await generateForSource(annotatedFile.path,
47+
await generateForSource(annotatedFile.path,
4948
openapiSpecFilePath: inputSpecFile.path);
5049

5150
var workingDirectory = path.join(parentFolder, 'output');
@@ -73,7 +72,7 @@ void main() {
7372
() async {
7473
var annotatedFile =
7574
File('$parentFolder/github_issue_135_dart_test_config.dart');
76-
var annotatedFileContents = annotatedFile.readAsStringSync();
75+
// var annotatedFileContents = annotatedFile.readAsStringSync();
7776
var inputSpecFile = File('$parentFolder/github_issue_#135.json');
7877

7978
var generatedOutput = await generateForSource(annotatedFile.path,
@@ -98,7 +97,7 @@ void main() {
9897
() async {
9998
var annotatedFile =
10099
File('$parentFolder/github_issue_135_dio_test_config.dart');
101-
var annotatedFileContents = annotatedFile.readAsStringSync();
100+
// var annotatedFileContents = annotatedFile.readAsStringSync();
102101
var inputSpecFile = File('$parentFolder/github_issue_#135.json');
103102

104103
var generatedOutput = await generateForSource(annotatedFile.path,

openapi-generator/test/utils.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ Future<String> generateForSource(String annotatedFilePath,
6363
///
6464
/// [path] available so an override for the adds generated comment test can
6565
/// compare the output.
66+
///
6667
@Deprecated('Use generateForSource instead')
6768
Future<String> generate(String source, {String path = 'lib/myapp.dart'}) async {
6869
final spec = File('${testSpecPath}openapi.test.yaml').readAsStringSync();

0 commit comments

Comments
 (0)