Skip to content

Commit 4df60c8

Browse files
committed
Protocols body and data attributes docstrings fix
1 parent d87ed3e commit 4df60c8

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

Diff for: openapi_core/protocols.py

+9-9
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@ class Request(BaseRequest, Protocol):
4444
parameters
4545
A RequestParameters object. Needs to supports path attribute setter
4646
to write resolved path parameters.
47-
body
48-
The request body, as string.
4947
content_type
5048
The content type with parameters (eg, charset, boundary etc.)
5149
and always lowercase.
50+
body
51+
The request body, as bytes (None if not provided).
5252
"""
5353

5454
@property
@@ -70,11 +70,11 @@ class WebhookRequest(BaseRequest, Protocol):
7070
parameters
7171
A RequestParameters object. Needs to supports path attribute setter
7272
to write resolved path parameters.
73-
body
74-
The request body, as string.
7573
content_type
7674
The content type with parameters (eg, charset, boundary etc.)
7775
and always lowercase.
76+
body
77+
The request body, as bytes (None if not provided).
7878
"""
7979

8080
@property
@@ -103,19 +103,16 @@ class Response(Protocol):
103103
"""Response protocol.
104104
105105
Attributes:
106-
data
107-
The response body, as string.
108106
status_code
109107
The status code as integer.
110108
headers
111109
Response headers as Headers.
112110
content_type
113111
The content type with parameters and always lowercase.
112+
data
113+
The response body, as bytes (None if not provided).
114114
"""
115115

116-
@property
117-
def data(self) -> Optional[bytes]: ...
118-
119116
@property
120117
def status_code(self) -> int: ...
121118

@@ -124,3 +121,6 @@ def content_type(self) -> str: ...
124121

125122
@property
126123
def headers(self) -> Mapping[str, Any]: ...
124+
125+
@property
126+
def data(self) -> Optional[bytes]: ...

0 commit comments

Comments
 (0)