Skip to content

Commit

Permalink
Closes #11 Security scheme not added to host during client generation
Browse files Browse the repository at this point in the history
  • Loading branch information
walsha2 committed Sep 12, 2023
1 parent a144378 commit 6ee58d3
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions lib/src/generators/client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -560,10 +560,13 @@ class $clientName {
path: path,
);

String hostDecoded = Uri.decodeFull(host);
if (host.isNotEmpty) {
hostDecoded = Uri.decodeFull(uri.authority);
}
String hostDecoded = Uri.decodeFull(
Uri(
host: host,
port: uri.port,
scheme: uri.scheme,
).toString(),
);

String uriDecoded = Uri.decodeFull(uri.toString());
if (!serverUri.hasAuthority) {
Expand Down

0 comments on commit 6ee58d3

Please sign in to comment.