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

@@ -85,13 +85,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
@@ -102,3 +95,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

@@ -47,6 +47,14 @@ fun Application.main() {
install(HSTS, ApplicationHstsConfiguration()) // see https://ktor.io/docs/hsts.html
install(Locations) // see https://ktor.io/docs/features-locations.html
install(Authentication) {
oauth("petstore_auth") {
client = HttpClient(Apache)
providerLookup = { ApplicationAuthProviders["petstore_auth"] }
urlProvider = { _ ->
// TODO: define a callback url here.
"/"
}
}
// "Implement API key auth (api_key) for parameter name 'api_key'."
apiKeyAuth("api_key") {
validate { apikeyCredential: ApiKeyCredential ->
@@ -56,14 +64,6 @@ fun Application.main() {
}
}
}
oauth("petstore_auth") {
client = HttpClient(Apache)
providerLookup = { ApplicationAuthProviders["petstore_auth"] }
urlProvider = { _ ->
// TODO: define a callback url here.
"/"
}
}
}
install(Routing) {
PetApi()

View File

@@ -57,7 +57,7 @@ val ApplicationAuthProviders: Map<String, OAuthServerSettings> = listOf<OAuthSer
clientId = settings.property("auth.oauth.petstore_auth.clientId").getString(),
clientSecret = settings.property("auth.oauth.petstore_auth.clientSecret").getString(),
defaultScopes = listOf("write:pets", "read:pets")
)
),
// OAuthServerSettings.OAuth2ServerSettings(
// name = "facebook",
// authorizeUrl = "https://graph.facebook.com/oauth/authorize",