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

@@ -2430,6 +2430,19 @@ toOuterEnum = \case
-- * Auth Methods
-- ** AuthOAuthPetstoreAuth
data AuthOAuthPetstoreAuth =
AuthOAuthPetstoreAuth Text -- ^ secret
deriving (P.Eq, P.Show, P.Typeable)
instance AuthMethod AuthOAuthPetstoreAuth where
applyAuthMethod _ a@(AuthOAuthPetstoreAuth secret) req =
P.pure $
if (P.typeOf a `P.elem` rAuthTypes req)
then req `setHeader` toHeader ("Authorization", "Bearer " <> secret)
& L.over rAuthTypesL (P.filter (/= P.typeOf a))
else req
-- ** AuthApiKeyApiKey
data AuthApiKeyApiKey =
AuthApiKeyApiKey Text -- ^ secret
@@ -2470,17 +2483,4 @@ instance AuthMethod AuthBasicHttpBasicTest where
else req
where cred = BC.append "Basic " (B64.encode $ BC.concat [ user, ":", pw ])
-- ** AuthOAuthPetstoreAuth
data AuthOAuthPetstoreAuth =
AuthOAuthPetstoreAuth Text -- ^ secret
deriving (P.Eq, P.Show, P.Typeable)
instance AuthMethod AuthOAuthPetstoreAuth where
applyAuthMethod _ a@(AuthOAuthPetstoreAuth secret) req =
P.pure $
if (P.typeOf a `P.elem` rAuthTypes req)
then req `setHeader` toHeader ("Authorization", "Bearer " <> secret)
& L.over rAuthTypesL (P.filter (/= P.typeOf a))
else req