Skip to content

Commit 2bcd248

Browse files
committed
fix: propagate custom serializer for any unmatched type for safety
1 parent 31f9780 commit 2bcd248

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

aws_lambda_powertools/event_handler/openapi/encoders.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ def jsonable_encoder( # noqa: PLR0911
156156
exclude_none=exclude_none,
157157
exclude_unset=exclude_unset,
158158
exclude_defaults=exclude_defaults,
159+
custom_serializer=custom_serializer,
159160
)
160161
except ValueError as exc:
161162
raise SerializationError(
@@ -287,6 +288,7 @@ def _dump_other(
287288
exclude_unset: bool = False,
288289
exclude_none: bool = False,
289290
exclude_defaults: bool = False,
291+
custom_serializer: Optional[Callable[[Any], str]] = None,
290292
) -> Any:
291293
"""
292294
Dump an object to a hashable object, using the same parameters as jsonable_encoder
@@ -308,6 +310,7 @@ def _dump_other(
308310
exclude_unset=exclude_unset,
309311
exclude_defaults=exclude_defaults,
310312
exclude_none=exclude_none,
313+
custom_serializer=custom_serializer,
311314
)
312315

313316

0 commit comments

Comments
 (0)