We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8195bda commit 657fed3Copy full SHA for 657fed3
aws_lambda_powertools/event_handler/openapi/models.py
@@ -14,6 +14,13 @@
14
15
16
class OpenapiExtensions(BaseModel):
17
+ """
18
+ This class serves as a Pydantic proxy model to add OpenAPI extensions.
19
+
20
+ OpenAPI extensions are arbitrary fields, so we remove openapi_extensions when dumping
21
+ and add only the provided value in the schema.
22
23
24
openapi_extensions: Optional[Dict[str, Any]] = None
25
26
# This rule is valid for Pydantic v1 and v2
@@ -474,7 +481,7 @@ class SecurityBase(OpenapiExtensions):
474
481
description: Optional[str] = None
475
482
476
483
if PYDANTIC_V2:
477
- model_config = {"extra": "allow", "populate_by_name": True}
484
+ model_config = {"extra": "allow", "populate_by_name": True} # type: ignore
478
485
479
486
else:
480
487
0 commit comments