Skip to content

Commit b9fb77b

Browse files
Addressing Heitor's feedback
1 parent 093905b commit b9fb77b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

aws_lambda_powertools/event_handler/util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def extract_origin_header(resolver_headers: Dict[str, Any]):
7373

7474
def _validate_openapi_security_parameters(
7575
security: List[Dict[str, List[str]]],
76-
security_schemes: Optional[Dict[str, "SecurityScheme"]],
76+
security_schemes: Optional[Dict[str, "SecurityScheme"]] = None,
7777
) -> bool:
7878
"""
7979
This function checks if all security requirements listed in the 'security'

docs/core/event_handler/api_gateway.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1033,7 +1033,7 @@ Below is an example configuration for serving Swagger UI from a custom path or C
10331033
No. Powertools adds support for generating OpenAPI documentation with [security schemes](https://swagger.io/docs/specification/authentication/), but it doesn't implement any of the security schemes itself, so you must implement the security mechanisms separately.
10341034

10351035
OpenAPI uses the term security scheme for [authentication and authorization schemes](https://swagger.io/docs/specification/authentication/){target="_blank"}.
1036-
When you're describing your API, declare security schemes at the top level, and reference them globally or per operation.
1036+
When you're describing your API, declare security schemes at the top level, and reference them globally or per operation. Remember to have the security configurations defined in the `security_schemes`, otherwise a `SchemaValidationError` will be raised.
10371037

10381038
=== "Global OpenAPI security schemes"
10391039

0 commit comments

Comments
 (0)