forked from loafle/openapi-generator-original
Renamed QueryParam to Pair class in Java templates.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
package {{invokerPackage}}.auth;
|
||||
|
||||
import {{invokerPackage}}.QueryParam;
|
||||
import {{invokerPackage}}.Pair;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
@@ -42,7 +42,7 @@ public class ApiKeyAuth implements Authentication {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void applyToParams(Set<QueryParam> queryParams, Map<String, String> headerParams) {
|
||||
public void applyToParams(Set<Pair> queryParams, Map<String, String> headerParams) {
|
||||
String value;
|
||||
if (apiKeyPrefix != null) {
|
||||
value = apiKeyPrefix + " " + apiKey;
|
||||
@@ -50,7 +50,7 @@ public class ApiKeyAuth implements Authentication {
|
||||
value = apiKey;
|
||||
}
|
||||
if (location == "query") {
|
||||
queryParams.add(new QueryParam(paramName, value));
|
||||
queryParams.add(new Pair(paramName, value));
|
||||
} else if (location == "header") {
|
||||
headerParams.put(paramName, value);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user