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:
@@ -18,25 +18,6 @@ from fastapi.security.api_key import APIKeyCookie, APIKeyHeader, APIKeyQuery #
|
||||
|
||||
from openapi_server.models.extra_models import TokenModel
|
||||
|
||||
|
||||
def get_token_api_key(
|
||||
token_api_key_header: str = Security(
|
||||
APIKeyHeader(name="api_key", auto_error=False)
|
||||
),
|
||||
) -> TokenModel:
|
||||
"""
|
||||
Check and retrieve authentication information from api_key.
|
||||
|
||||
:param token_api_key_header API key provided by Authorization[api_key] header
|
||||
|
||||
|
||||
:type token_api_key_header: str
|
||||
:return: Information attached to provided api_key or None if api_key is invalid or does not allow access to called API
|
||||
:rtype: TokenModel | None
|
||||
"""
|
||||
|
||||
...
|
||||
|
||||
oauth2_implicit = OAuth2(
|
||||
flows=OAuthFlows(
|
||||
implicit=OAuthFlowImplicit(
|
||||
@@ -81,3 +62,22 @@ def validate_scope_petstore_auth(
|
||||
|
||||
return False
|
||||
|
||||
|
||||
def get_token_api_key(
|
||||
token_api_key_header: str = Security(
|
||||
APIKeyHeader(name="api_key", auto_error=False)
|
||||
),
|
||||
) -> TokenModel:
|
||||
"""
|
||||
Check and retrieve authentication information from api_key.
|
||||
|
||||
:param token_api_key_header API key provided by Authorization[api_key] header
|
||||
|
||||
|
||||
:type token_api_key_header: str
|
||||
:return: Information attached to provided api_key or None if api_key is invalid or does not allow access to called API
|
||||
:rtype: TokenModel | None
|
||||
"""
|
||||
|
||||
...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user