Skip to content

Commit f31ca98

Browse files
committed
missing javadocs generator for Central
1 parent b212e04 commit f31ca98

File tree

3 files changed

+20
-4
lines changed

3 files changed

+20
-4
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
4.1.2
2+
=====
3+
Support for repeating query parameters
4+
15
4.1.1
26
=====
37
Support for unencoded Date + DateTime parameters for query parameters.

lib/api_dio_client_delegate.dart

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,21 @@ class DioClientDelegate implements ApiClientDelegate {
1111
{bool passErrorsAsApiResponses = false}) async {
1212
String url = basePath + path;
1313

14-
// fill in query parameters
15-
Map<String, String> qp = {};
16-
queryParams.forEach((q) => qp[q.name] = q.value);
14+
// fill in query parameters, taking care to deal with duplicate
15+
// field names
16+
Map<String, dynamic> qp = {};
17+
queryParams.forEach((q) {
18+
if (qp.containsKey(q.name)) {
19+
final val = qp[q.name];
20+
if (val is List) {
21+
val.add(q.value);
22+
} else {
23+
qp[q.name] = [val, q.value];
24+
}
25+
} else {
26+
qp[q.name] = q.value;
27+
}
28+
});
1729

1830
options.responseType = ResponseType.stream;
1931
options.receiveDataWhenStatusError = true;

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: openapi_dart_common
2-
version: 4.1.1
2+
version: 4.1.2
33
homepage: https://www.featurehub.io
44
repository: https://github.com/dart-ogurets/openapi_dart_common
55
description: OpenAPI API common libraries so the generator doesn't generate them

0 commit comments

Comments
 (0)