Skip to content

Commit

Permalink
Merge pull request #829 from python-openapi/fix/protocols-body-and-da…
Browse files Browse the repository at this point in the history
…ta-attributes-docstrings-fix

Protocols body and data attributes docstrings fix
  • Loading branch information
p1c2u committed Apr 10, 2024
2 parents d87ed3e + 4df60c8 commit e2399b2
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions openapi_core/protocols.py
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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: ...

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

@property
def headers(self) -> Mapping[str, Any]: ...

@property
def data(self) -> Optional[bytes]: ...

0 comments on commit e2399b2

Please sign in to comment.