forked from loafle/openapi-generator-original
[Java] [Kotlin] (#14876) fix use of isBasic conditions - do not use HttpBearerAuth (or HttpBasicAuth) for other http auth methods (such as http signature auth or custom schemes) (#15220)
* remove http signature from test yaml when not supported * do not use HttpBearerAuth for signature auth or other unsupported http auth method ignore unsupported http auth method unless generated code would not compile (in which case, an exception is thrown) * [Java] fix use of isBasic condition * [kotlin] fix use of isBasic condition
This commit is contained in:
@@ -70,7 +70,7 @@ public class ApiClient {
|
||||
} else if ("bearer_test".equals(authName)) {
|
||||
auth = new HttpBearerAuth("bearer");
|
||||
} else if ("http_signature_test".equals(authName)) {
|
||||
auth = new HttpBearerAuth("signature");
|
||||
throw new RuntimeException("auth name \"" + authName + "\" does not have a supported http scheme type");
|
||||
} else {
|
||||
throw new RuntimeException("auth name \"" + authName + "\" not found in available auth names");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user