Skip to content

Commit e0e2249

Browse files
author
Michael Brewer
committed
fix(docs): enable allow_reuse to fix the docs
1 parent f7cd398 commit e0e2249

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

Diff for: aws_lambda_powertools/utilities/parser/models/apigw.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ class APIGatewayEventRequestContext(BaseModel):
6868
routeKey: Optional[str]
6969
operationName: Optional[str]
7070

71-
@root_validator
71+
@root_validator(allow_reuse=True)
7272
def check_message_id(cls, values):
7373
message_id, event_type = values.get("messageId"), values.get("eventType")
7474
if message_id is not None and event_type != "MESSAGE":

Diff for: aws_lambda_powertools/utilities/parser/models/cloudwatch.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class CloudWatchLogsDecode(BaseModel):
2828
class CloudWatchLogsData(BaseModel):
2929
decoded_data: CloudWatchLogsDecode = Field(None, alias="data")
3030

31-
@validator("decoded_data", pre=True)
31+
@validator("decoded_data", pre=True, allow_reuse=True)
3232
def prepare_data(cls, value):
3333
try:
3434
logger.debug("Decoding base64 cloudwatch log data before parsing")

Diff for: aws_lambda_powertools/utilities/parser/models/kinesis.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class KinesisDataStreamRecordPayload(BaseModel):
1818
data: bytes # base64 encoded str is parsed into bytes
1919
approximateArrivalTimestamp: float
2020

21-
@validator("data", pre=True)
21+
@validator("data", pre=True, allow_reuse=True)
2222
def data_base64_decode(cls, value):
2323
try:
2424
logger.debug("Decoding base64 Kinesis data record before parsing")

Diff for: aws_lambda_powertools/utilities/parser/models/sns.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class SnsNotificationModel(BaseModel):
2525
Timestamp: datetime
2626
SignatureVersion: str
2727

28-
@root_validator(pre=True)
28+
@root_validator(pre=True, allow_reuse=True)
2929
def check_sqs_protocol(cls, values):
3030
sqs_rewritten_keys = ("UnsubscribeURL", "SigningCertURL")
3131
if any(key in sqs_rewritten_keys for key in values):

0 commit comments

Comments
 (0)