From 7704ff3d08043afd9db4e819ea5c655aff6c77d3 Mon Sep 17 00:00:00 2001 From: Peter Leibiger Date: Wed, 17 Feb 2021 14:40:27 +0100 Subject: [PATCH] [dart][dart-dio] Allow API key authentication with multiple API keys (#8728) Remove the break stopping after the first key. --- .../src/main/resources/dart-dio/auth/api_key_auth.mustache | 1 - .../dart-dio/petstore_client_lib/lib/auth/api_key_auth.dart | 1 - .../dart-dio/petstore_client_lib/lib/auth/api_key_auth.dart | 1 - .../dart-dio/petstore_client_lib_fake/lib/auth/api_key_auth.dart | 1 - 4 files changed, 4 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/dart-dio/auth/api_key_auth.mustache b/modules/openapi-generator/src/main/resources/dart-dio/auth/api_key_auth.mustache index f5dd98b6b09..30d9661692e 100644 --- a/modules/openapi-generator/src/main/resources/dart-dio/auth/api_key_auth.mustache +++ b/modules/openapi-generator/src/main/resources/dart-dio/auth/api_key_auth.mustache @@ -20,7 +20,6 @@ class ApiKeyAuthInterceptor extends AuthInterceptor { } else { options.headers[authKeyName] = apiKey; } - break; } } return super.onRequest(options); diff --git a/samples/client/petstore/dart-dio/petstore_client_lib/lib/auth/api_key_auth.dart b/samples/client/petstore/dart-dio/petstore_client_lib/lib/auth/api_key_auth.dart index 8490421b0c2..2aa45a85802 100644 --- a/samples/client/petstore/dart-dio/petstore_client_lib/lib/auth/api_key_auth.dart +++ b/samples/client/petstore/dart-dio/petstore_client_lib/lib/auth/api_key_auth.dart @@ -26,7 +26,6 @@ class ApiKeyAuthInterceptor extends AuthInterceptor { } else { options.headers[authKeyName] = apiKey; } - break; } } return super.onRequest(options); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/auth/api_key_auth.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/auth/api_key_auth.dart index 8490421b0c2..2aa45a85802 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/auth/api_key_auth.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/auth/api_key_auth.dart @@ -26,7 +26,6 @@ class ApiKeyAuthInterceptor extends AuthInterceptor { } else { options.headers[authKeyName] = apiKey; } - break; } } return super.onRequest(options); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/auth/api_key_auth.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/auth/api_key_auth.dart index 8490421b0c2..2aa45a85802 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/auth/api_key_auth.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/auth/api_key_auth.dart @@ -26,7 +26,6 @@ class ApiKeyAuthInterceptor extends AuthInterceptor { } else { options.headers[authKeyName] = apiKey; } - break; } } return super.onRequest(options);