From 92e7d0e69c0af98964ff463c4ea61b779b51dbf2 Mon Sep 17 00:00:00 2001 From: Shyri Villar Date: Wed, 20 Jan 2016 19:59:28 +0100 Subject: [PATCH] fix ApiKeyAuth applyToHeader when no api-key is provided --- .../android/libraries/volley/auth/apikeyauth.mustache | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/swagger-codegen/src/main/resources/android/libraries/volley/auth/apikeyauth.mustache b/modules/swagger-codegen/src/main/resources/android/libraries/volley/auth/apikeyauth.mustache index a1824b551ca..44c5ed96eca 100644 --- a/modules/swagger-codegen/src/main/resources/android/libraries/volley/auth/apikeyauth.mustache +++ b/modules/swagger-codegen/src/main/resources/android/libraries/volley/auth/apikeyauth.mustache @@ -44,6 +44,9 @@ public class ApiKeyAuth implements Authentication { @Override public void applyToParams(List queryParams, Map headerParams) { String value; + if (apiKey == null) { + return; + } if (apiKeyPrefix != null) { value = apiKeyPrefix + " " + apiKey; } else {