forked from loafle/openapi-generator-original
Preserve order of securitySchemes (#14536)
* Remove alphabetical sort * Update integration testing expectations * Regenerate files
This commit is contained in:
@@ -127,6 +127,14 @@ public class ApiClient extends JavaTimeFormatter {
|
||||
// Setup authentications (key: authentication name, value: authentication).
|
||||
authentications = new HashMap<String, Authentication>();
|
||||
Authentication auth = null;
|
||||
if (authMap != null) {
|
||||
auth = authMap.get("petstore_auth");
|
||||
}
|
||||
if (auth instanceof OAuth) {
|
||||
authentications.put("petstore_auth", auth);
|
||||
} else {
|
||||
authentications.put("petstore_auth", new OAuth(basePath, ""));
|
||||
}
|
||||
if (authMap != null) {
|
||||
auth = authMap.get("api_key");
|
||||
}
|
||||
@@ -151,14 +159,6 @@ public class ApiClient extends JavaTimeFormatter {
|
||||
} else {
|
||||
authentications.put("http_basic_test", new HttpBasicAuth());
|
||||
}
|
||||
if (authMap != null) {
|
||||
auth = authMap.get("petstore_auth");
|
||||
}
|
||||
if (auth instanceof OAuth) {
|
||||
authentications.put("petstore_auth", auth);
|
||||
} else {
|
||||
authentications.put("petstore_auth", new OAuth(basePath, ""));
|
||||
}
|
||||
// Prevent the authentications from being modified.
|
||||
authentications = Collections.unmodifiableMap(authentications);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user