Skip to content

Commit d19bfeb

Browse files
authored
replace tabs with 4-space in dart templates (#8740)
1 parent bb71201 commit d19bfeb

6 files changed

Lines changed: 35 additions & 35 deletions

File tree

modules/openapi-generator/src/main/resources/dart-dio/api_util.mustache

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ import 'package:built_value/serializer.dart';
55

66
/// Format the given parameter object into string.
77
String parameterToString(Serializers serializers, dynamic value) {
8-
if (value == null) {
9-
return '';
10-
} else if (value is String || value is num) {
11-
return value.toString();
12-
} else {
13-
return json.encode(serializers.serialize(value));
14-
}
8+
if (value == null) {
9+
return '';
10+
} else if (value is String || value is num) {
11+
return value.toString();
12+
} else {
13+
return json.encode(serializers.serialize(value));
14+
}
1515
}

modules/openapi-generator/src/main/resources/dart/auth/authentication.mustache

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ part of {{pubName}}.api;
22

33
abstract class Authentication {
44
5-
/// Apply authentication settings to header and query params.
6-
void applyToParams(List<QueryParam> queryParams, Map<String, String> headerParams);
5+
/// Apply authentication settings to header and query params.
6+
void applyToParams(List<QueryParam> queryParams, Map<String, String> headerParams);
77
}

modules/openapi-generator/src/main/resources/dart2/class.mustache

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,10 @@ class {{{classname}}} {
9191
: _dateEpochMarker == '{{{pattern}}}'
9292
? DateTime.fromMillisecondsSinceEpoch(json[r'{{{baseName}}}'] as int, isUtc: true)
9393
: DateTime.parse(json[r'{{{baseName}}}']),
94-
{{/pattern}}
94+
{{/pattern}}
9595
{{^pattern}}
9696
: DateTime.parse(json[r'{{{baseName}}}']),
97-
{{/pattern}}
97+
{{/pattern}}
9898
{{/isDateTime}}
9999
{{#isDate}}
100100
{{{name}}}: json[r'{{{baseName}}}'] == null
@@ -103,10 +103,10 @@ class {{{classname}}} {
103103
: _dateEpochMarker == '{{{pattern}}}'
104104
? DateTime.fromMillisecondsSinceEpoch(json[r'{{{baseName}}}'] as int, isUtc: true)
105105
: DateTime.parse(json[r'{{{baseName}}}']),
106-
{{/pattern}}
106+
{{/pattern}}
107107
{{^pattern}}
108108
: DateTime.parse(json[r'{{{baseName}}}']),
109-
{{/pattern}}
109+
{{/pattern}}
110110
{{/isDate}}
111111
{{^isDateTime}}
112112
{{^isDate}}
@@ -138,7 +138,7 @@ class {{{classname}}} {
138138
{{/items.complexType}}
139139
{{^items.complexType}}
140140
: (json[r'{{{baseName}}}'] as Map).cast<String, List>(),
141-
{{/items.complexType}}
141+
{{/items.complexType}}
142142
{{/items.isArray}}
143143
{{^items.isArray}}
144144
{{{name}}}: json[r'{{{baseName}}}'] == null

samples/client/petstore/dart-dio/petstore_client_lib/lib/api_util.dart

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ import 'package:built_value/serializer.dart';
1111

1212
/// Format the given parameter object into string.
1313
String parameterToString(Serializers serializers, dynamic value) {
14-
if (value == null) {
15-
return '';
16-
} else if (value is String || value is num) {
17-
return value.toString();
18-
} else {
19-
return json.encode(serializers.serialize(value));
20-
}
14+
if (value == null) {
15+
return '';
16+
} else if (value is String || value is num) {
17+
return value.toString();
18+
} else {
19+
return json.encode(serializers.serialize(value));
20+
}
2121
}

samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api_util.dart

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ import 'package:built_value/serializer.dart';
1111

1212
/// Format the given parameter object into string.
1313
String parameterToString(Serializers serializers, dynamic value) {
14-
if (value == null) {
15-
return '';
16-
} else if (value is String || value is num) {
17-
return value.toString();
18-
} else {
19-
return json.encode(serializers.serialize(value));
20-
}
14+
if (value == null) {
15+
return '';
16+
} else if (value is String || value is num) {
17+
return value.toString();
18+
} else {
19+
return json.encode(serializers.serialize(value));
20+
}
2121
}

samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api_util.dart

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ import 'package:built_value/serializer.dart';
1111

1212
/// Format the given parameter object into string.
1313
String parameterToString(Serializers serializers, dynamic value) {
14-
if (value == null) {
15-
return '';
16-
} else if (value is String || value is num) {
17-
return value.toString();
18-
} else {
19-
return json.encode(serializers.serialize(value));
20-
}
14+
if (value == null) {
15+
return '';
16+
} else if (value is String || value is num) {
17+
return value.toString();
18+
} else {
19+
return json.encode(serializers.serialize(value));
20+
}
2121
}

0 commit comments

Comments
 (0)