Skip to content

Commit 12c138a

Browse files
committed
fix: Last few tweaks
1 parent c229767 commit 12c138a

File tree

3 files changed

+11
-14
lines changed

3 files changed

+11
-14
lines changed

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -418,8 +418,7 @@ class DioAltProperties extends AdditionalProperties {
418418
wrapper: wrapper);
419419

420420
DioAltProperties.fromMap(Map<String, dynamic> map)
421-
: nullSafe =
422-
map['nullSafe'] != null ? map['nullableFields'] == 'true' : null,
421+
: nullSafe = map['nullSafe'] != null ? map['nullSafe'] == 'true' : null,
423422
nullSafeArrayDefault = map['nullSafeArrayDefault'] != null
424423
? map['nullSafeArrayDefault'] == 'true'
425424
: null,

openapi-generator-annotations/test/additional_properties_test.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ void main() {
175175
'sortParamsByRequiredFlag': props.sortParamsByRequiredFlag,
176176
'sourceFolder': props.sourceFolder,
177177
'wrapper': 'none',
178-
'nullableFields': props.nullableFields,
178+
'nullableFields': '${props.nullableFields}',
179179
'dateLibrary': 'core',
180180
'serializationLibrary': 'json_serializable',
181181
};
@@ -289,9 +289,9 @@ void main() {
289289
'sortParamsByRequiredFlag': props.sortParamsByRequiredFlag,
290290
'sourceFolder': props.sourceFolder,
291291
'wrapper': 'none',
292-
'nullSafe': props.nullSafe,
293-
'nullSafeArrayDefault': props.nullSafeArrayDefault,
294-
'listAnyOf': props.listAnyOf,
292+
'nullSafe': '${props.nullSafe}',
293+
'nullSafeArrayDefault': '${props.nullSafeArrayDefault}',
294+
'listAnyOf': '${props.listAnyOf}',
295295
'pubspecDevDependencies': props.pubspecDevDependencies,
296296
'pubspecDependencies': props.pubspecDependencies,
297297
};

openapi-generator/test/determine_flutter_projet_status_test.dart

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,22 +23,20 @@ void main() {
2323
test('pubspec is empty', () async {
2424
// TODO: There is likely a better way to handle this.
2525
try {
26-
final isFlutterProjecct =
27-
await checkPubspecAndWrapperForFlutterSupport(
28-
providedPubspecPath: '${basePath}empty_pubspec.yaml');
26+
await checkPubspecAndWrapperForFlutterSupport(
27+
providedPubspecPath: '${basePath}empty_pubspec.yaml');
2928
fail('Should\'ve thrown invalid error');
30-
} catch (e, st) {
29+
} catch (e, _) {
3130
expect(e, 'Invalid pubspec.yaml');
3231
}
3332
});
3433
test('pubspec doesn\'t exist', () async {
3534
final path = '${basePath}doesnotexist.yaml';
3635
try {
37-
final isFlutterProjecct =
38-
await checkPubspecAndWrapperForFlutterSupport(
39-
providedPubspecPath: path);
36+
await checkPubspecAndWrapperForFlutterSupport(
37+
providedPubspecPath: path);
4038
fail('Should\'ve thrown missing pubspec error');
41-
} catch (e, st) {
39+
} catch (e, _) {
4240
expect(e, 'Pubspec doesn\'t exist at path: $path');
4341
}
4442
});

0 commit comments

Comments
 (0)