mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-11 10:22:44 +00:00
[Java-Feign] Fixed String comparison using equals instead of == operator (#4740)
* [Java-Feign] Fixed String comparison using equals instead of == operator * [Java-Feign] Updated ApiClient with ./bin/java-petstore-feign.sh
This commit is contained in:
@@ -42,11 +42,11 @@ public class ApiClient {
|
||||
this();
|
||||
for(String authName : authNames) {
|
||||
RequestInterceptor auth;
|
||||
if (authName == "api_key") {
|
||||
if ("api_key".equals(authName)) {
|
||||
auth = new ApiKeyAuth("header", "api_key");
|
||||
} else if (authName == "http_basic_test") {
|
||||
} else if ("http_basic_test".equals(authName)) {
|
||||
auth = new HttpBasicAuth();
|
||||
} else if (authName == "petstore_auth") {
|
||||
} else if ("petstore_auth".equals(authName)) {
|
||||
auth = new OAuth(OAuthFlow.implicit, "http://petstore.swagger.io/api/oauth/dialog", "", "write:pets, read:pets");
|
||||
} else {
|
||||
throw new RuntimeException("auth name \"" + authName + "\" not found in available auth names");
|
||||
|
||||
Reference in New Issue
Block a user