forked from loafle/openapi-generator-original
fix ApiKeyAuth applyToHeader when no api-key is provided
This commit is contained in:
parent
060f0f33c2
commit
92e7d0e69c
@ -44,6 +44,9 @@ public class ApiKeyAuth implements Authentication {
|
|||||||
@Override
|
@Override
|
||||||
public void applyToParams(List<Pair> queryParams, Map<String, String> headerParams) {
|
public void applyToParams(List<Pair> queryParams, Map<String, String> headerParams) {
|
||||||
String value;
|
String value;
|
||||||
|
if (apiKey == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (apiKeyPrefix != null) {
|
if (apiKeyPrefix != null) {
|
||||||
value = apiKeyPrefix + " " + apiKey;
|
value = apiKeyPrefix + " " + apiKey;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user