diff --git a/openapi_core/casting/schemas/casters.py b/openapi_core/casting/schemas/casters.py index 94df492b..55022dc7 100644 --- a/openapi_core/casting/schemas/casters.py +++ b/openapi_core/casting/schemas/casters.py @@ -74,7 +74,10 @@ def validate(self, value: Any) -> None: if isinstance(value, bool): return - if value.lower() not in ["false", "true"]: + if ( + not isinstance(value, (str, bytes)) or + value.lower() not in ["false", "true"] + ): raise ValueError("not a boolean format")
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: