From 4df60c8cb04e677946c67721f72bd7ee368906be Mon Sep 17 00:00:00 2001 From: p1c2u Date: Wed, 10 Apr 2024 18:03:44 +0000 Subject: [PATCH] Protocols body and data attributes docstrings fix --- openapi_core/protocols.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/openapi_core/protocols.py b/openapi_core/protocols.py index ba4a27c5..5c3145c6 100644 --- a/openapi_core/protocols.py +++ b/openapi_core/protocols.py @@ -44,11 +44,11 @@ class Request(BaseRequest, Protocol): parameters A RequestParameters object. Needs to supports path attribute setter to write resolved path parameters. - body - The request body, as string. content_type The content type with parameters (eg, charset, boundary etc.) and always lowercase. + body + The request body, as bytes (None if not provided). """ @property @@ -70,11 +70,11 @@ class WebhookRequest(BaseRequest, Protocol): parameters A RequestParameters object. Needs to supports path attribute setter to write resolved path parameters. - body - The request body, as string. content_type The content type with parameters (eg, charset, boundary etc.) and always lowercase. + body + The request body, as bytes (None if not provided). """ @property @@ -103,19 +103,16 @@ class Response(Protocol): """Response protocol. Attributes: - data - The response body, as string. status_code The status code as integer. headers Response headers as Headers. content_type The content type with parameters and always lowercase. + data + The response body, as bytes (None if not provided). """ - @property - def data(self) -> Optional[bytes]: ... - @property def status_code(self) -> int: ... @@ -124,3 +121,6 @@ def content_type(self) -> str: ... @property def headers(self) -> Mapping[str, Any]: ... + + @property + def data(self) -> Optional[bytes]: ...