mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-11 16:02:44 +00:00
Preserve order of securitySchemes (#14536)
* Remove alphabetical sort * Update integration testing expectations * Regenerate files
This commit is contained in:
@@ -232,6 +232,16 @@ Class | Method | HTTP request | Description
|
||||
## Documentation for Authorization
|
||||
|
||||
Authentication schemes defined for the API:
|
||||
### petstore_auth
|
||||
|
||||
|
||||
- **Type**: OAuth
|
||||
- **Flow**: implicit
|
||||
- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog
|
||||
- **Scopes**:
|
||||
- write:pets: modify pets in your account
|
||||
- read:pets: read your pets
|
||||
|
||||
### api_key
|
||||
|
||||
|
||||
@@ -251,16 +261,6 @@ Authentication schemes defined for the API:
|
||||
|
||||
- **Type**: HTTP basic authentication
|
||||
|
||||
### petstore_auth
|
||||
|
||||
|
||||
- **Type**: OAuth
|
||||
- **Flow**: implicit
|
||||
- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog
|
||||
- **Scopes**:
|
||||
- write:pets: modify pets in your account
|
||||
- read:pets: read your pets
|
||||
|
||||
|
||||
## Recommendation
|
||||
|
||||
|
||||
@@ -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