Skip to content

fix(event_handler): regression making pydantic required (it should not) #4500

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions aws_lambda_powertools/event_handler/util.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from typing import Any, Dict, List, Optional

from aws_lambda_powertools.event_handler.openapi.models import SecurityScheme
from aws_lambda_powertools.utilities.data_classes.shared_functions import get_header_value


Expand Down Expand Up @@ -73,7 +72,7 @@ def extract_origin_header(resolver_headers: Dict[str, Any]):

def _validate_openapi_security_parameters(
security: List[Dict[str, List[str]]],
security_schemes: Optional[Dict[str, "SecurityScheme"]] = None,
security_schemes: Optional[Dict[str, Any]] = None,
) -> bool:
"""
This function checks if all security requirements listed in the 'security'
Expand All @@ -84,7 +83,7 @@ def _validate_openapi_security_parameters(
----------
security: List[Dict[str, List[str]]]
A list of security requirements
security_schemes: Optional[Dict[str, "SecurityScheme"]]
security_schemes: Optional[Dict[str, Any]]
A dictionary mapping security scheme names to their corresponding security scheme objects.

Returns
Expand Down