From 3f5e81e0f7a97c246663ed58fc6f138d646ba71f Mon Sep 17 00:00:00 2001 From: p1c2u Date: Thu, 17 Aug 2023 14:14:20 +0100 Subject: [PATCH] byte and binary formats return bytes type --- openapi_core/unmarshalling/schemas/util.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openapi_core/unmarshalling/schemas/util.py b/openapi_core/unmarshalling/schemas/util.py index 6efc8e60..6f6371c4 100644 --- a/openapi_core/unmarshalling/schemas/util.py +++ b/openapi_core/unmarshalling/schemas/util.py @@ -18,8 +18,8 @@ def format_uuid(value: Any) -> UUID: return UUID(value) -def format_byte(value: str, encoding: str = "utf8") -> str: - return str(b64decode(value), encoding) +def format_byte(value: str, encoding: str = "utf8") -> bytes: + return b64decode(value) def format_number(value: str) -> Union[int, float]: