Skip to content

Commit

Permalink
missing javadocs generator for Central
Browse files Browse the repository at this point in the history
  • Loading branch information
rvowles committed Jul 23, 2022
1 parent b212e04 commit f31ca98
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
4.1.2
=====
Support for repeating query parameters

4.1.1
=====
Support for unencoded Date + DateTime parameters for query parameters.
Expand Down
18 changes: 15 additions & 3 deletions lib/api_dio_client_delegate.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,21 @@ class DioClientDelegate implements ApiClientDelegate {
{bool passErrorsAsApiResponses = false}) async {
String url = basePath + path;

// fill in query parameters
Map<String, String> qp = {};
queryParams.forEach((q) => qp[q.name] = q.value);
// fill in query parameters, taking care to deal with duplicate
// field names
Map<String, dynamic> qp = {};
queryParams.forEach((q) {
if (qp.containsKey(q.name)) {
final val = qp[q.name];
if (val is List) {
val.add(q.value);
} else {
qp[q.name] = [val, q.value];
}
} else {
qp[q.name] = q.value;
}
});

options.responseType = ResponseType.stream;
options.receiveDataWhenStatusError = true;
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: openapi_dart_common
version: 4.1.1
version: 4.1.2
homepage: https://www.featurehub.io
repository: https://github.com/dart-ogurets/openapi_dart_common
description: OpenAPI API common libraries so the generator doesn't generate them
Expand Down

0 comments on commit f31ca98

Please sign in to comment.