From 268366563ba9ba4b3ec62ab361d190a13757849e Mon Sep 17 00:00:00 2001 From: Noor Dawod Date: Mon, 20 Dec 2021 20:31:22 +0100 Subject: [PATCH] Regenerate Petstore source code. --- .../dart2/petstore_client_lib/lib/auth/api_key_auth.dart | 4 +--- .../dart2/petstore_client_lib/lib/auth/http_basic_auth.dart | 3 --- .../dart2/petstore_client_lib/lib/auth/http_bearer_auth.dart | 2 -- .../petstore/dart2/petstore_client_lib/lib/auth/oauth.dart | 1 - .../dart2/petstore_client_lib_fake/lib/auth/api_key_auth.dart | 4 +--- .../petstore_client_lib_fake/lib/auth/http_basic_auth.dart | 3 --- .../petstore_client_lib_fake/lib/auth/http_bearer_auth.dart | 2 -- .../dart2/petstore_client_lib_fake/lib/auth/oauth.dart | 1 - 8 files changed, 2 insertions(+), 18 deletions(-) diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/auth/api_key_auth.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/auth/api_key_auth.dart index fc4efa388b41..e304eda321ee 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/auth/api_key_auth.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/auth/api_key_auth.dart @@ -21,9 +21,7 @@ class ApiKeyAuth implements Authentication { @override void applyToParams(List queryParams, Map headerParams) { - apiKeyPrefix = apiKeyPrefix.trim(); - - final paramValue = (apiKeyPrefix.isEmpty ? apiKey : '$apiKeyPrefix $apiKey').trim(); + final paramValue = apiKeyPrefix.isEmpty ? apiKey : '$apiKeyPrefix $apiKey'; if (paramValue.isNotEmpty) { if (location == 'query') { diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/auth/http_basic_auth.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/auth/http_basic_auth.dart index 559da5914e42..81abd7185f2d 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/auth/http_basic_auth.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/auth/http_basic_auth.dart @@ -18,9 +18,6 @@ class HttpBasicAuth implements Authentication { @override void applyToParams(List queryParams, Map headerParams) { - username = username.trim(); - password = password.trim(); - if (username.isNotEmpty && password.isNotEmpty) { final credentials = '$username:$password'; headerParams['Authorization'] = 'Basic ${base64.encode(utf8.encode(credentials))}'; diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/auth/http_bearer_auth.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/auth/http_bearer_auth.dart index fbc72db3e53d..213f3483b8fb 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/auth/http_bearer_auth.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/auth/http_bearer_auth.dart @@ -42,8 +42,6 @@ class HttpBearerAuth implements Authentication { return; } - accessToken = accessToken.trim(); - if (accessToken.isNotEmpty) { headerParams['Authorization'] = 'Bearer $accessToken'; } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/auth/oauth.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/auth/oauth.dart index 78f97a4afe68..e9b87cffb052 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/auth/oauth.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/auth/oauth.dart @@ -17,7 +17,6 @@ class OAuth implements Authentication { @override void applyToParams(List queryParams, Map headerParams) { - accessToken = accessToken.trim(); if (accessToken.isNotEmpty) { headerParams['Authorization'] = 'Bearer $accessToken'; } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/auth/api_key_auth.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/auth/api_key_auth.dart index fc4efa388b41..e304eda321ee 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/auth/api_key_auth.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/auth/api_key_auth.dart @@ -21,9 +21,7 @@ class ApiKeyAuth implements Authentication { @override void applyToParams(List queryParams, Map headerParams) { - apiKeyPrefix = apiKeyPrefix.trim(); - - final paramValue = (apiKeyPrefix.isEmpty ? apiKey : '$apiKeyPrefix $apiKey').trim(); + final paramValue = apiKeyPrefix.isEmpty ? apiKey : '$apiKeyPrefix $apiKey'; if (paramValue.isNotEmpty) { if (location == 'query') { diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/auth/http_basic_auth.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/auth/http_basic_auth.dart index 559da5914e42..81abd7185f2d 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/auth/http_basic_auth.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/auth/http_basic_auth.dart @@ -18,9 +18,6 @@ class HttpBasicAuth implements Authentication { @override void applyToParams(List queryParams, Map headerParams) { - username = username.trim(); - password = password.trim(); - if (username.isNotEmpty && password.isNotEmpty) { final credentials = '$username:$password'; headerParams['Authorization'] = 'Basic ${base64.encode(utf8.encode(credentials))}'; diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/auth/http_bearer_auth.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/auth/http_bearer_auth.dart index fbc72db3e53d..213f3483b8fb 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/auth/http_bearer_auth.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/auth/http_bearer_auth.dart @@ -42,8 +42,6 @@ class HttpBearerAuth implements Authentication { return; } - accessToken = accessToken.trim(); - if (accessToken.isNotEmpty) { headerParams['Authorization'] = 'Bearer $accessToken'; } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/auth/oauth.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/auth/oauth.dart index 78f97a4afe68..e9b87cffb052 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/auth/oauth.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/auth/oauth.dart @@ -17,7 +17,6 @@ class OAuth implements Authentication { @override void applyToParams(List queryParams, Map headerParams) { - accessToken = accessToken.trim(); if (accessToken.isNotEmpty) { headerParams['Authorization'] = 'Bearer $accessToken'; }