Preserve order of securitySchemes (#14536)

* Remove alphabetical sort

* Update integration testing expectations

* Regenerate files
This commit is contained in:
Beppe Catanese
2023-02-10 15:20:19 +01:00
committed by GitHub
parent 1b60ee1799
commit 68b944e6e6
308 changed files with 4019 additions and 4014 deletions

View File

@@ -80,13 +80,6 @@ Class | Method | HTTP request | Description
<a name="documentation-for-authorization"></a>
## Documentation for Authorization
<a name="api_key"></a>
### api_key
- **Type**: API key
- **API key parameter name**: api_key
- **Location**: HTTP header
<a name="petstore_auth"></a>
### petstore_auth
@@ -97,3 +90,10 @@ Class | Method | HTTP request | Description
- write:pets: modify pets in your account
- read:pets: read your pets
<a name="api_key"></a>
### api_key
- **Type**: API key
- **API key parameter name**: api_key
- **Location**: HTTP header

View File

@@ -144,6 +144,11 @@ open class ApiClient(val baseUrl: String, val client: OkHttpClient = defaultClie
}
protected fun <T> updateAuthParams(requestConfig: RequestConfig<T>) {
if (requestConfig.headers[Authorization].isNullOrEmpty()) {
accessToken?.let { accessToken ->
requestConfig.headers[Authorization] = "Bearer $accessToken "
}
}
if (requestConfig.headers["api_key"].isNullOrEmpty()) {
if (apiKey["api_key"] != null) {
if (apiKeyPrefix["api_key"] != null) {
@@ -153,11 +158,6 @@ open class ApiClient(val baseUrl: String, val client: OkHttpClient = defaultClie
}
}
}
if (requestConfig.headers[Authorization].isNullOrEmpty()) {
accessToken?.let { accessToken ->
requestConfig.headers[Authorization] = "Bearer $accessToken "
}
}
}
protected inline fun <reified I, reified T: Any?> request(requestConfig: RequestConfig<I>): ApiResponse<T?> {