Skip to content

Commit 7b9b00e

Browse files
committed
Change response type: failed->failure
1 parent a0d5bf7 commit 7b9b00e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

openapi_python_client/parser/properties/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@
3737

3838

3939
class ResponseType(Enum):
40-
AUTO = 'auto' # Automatically decide whether a response is a failed or success response - every response within the rance [200, 300) will be considered success, others as failed
41-
FAILED = 'failed' # Explicitly specified failed response
42-
SUCCESS = 'success' # Explicitly specified success response
40+
AUTO = 'auto' # Automatically decide whether a response is a failed or success response - every response within the rance [200, 300) will be considered success, others as failed
41+
FAILURE = 'failure' # Explicitly specified failed response
42+
SUCCESS = 'success' # Explicitly specified success response
4343

4444

4545
@attr.s(auto_attribs=True, frozen=True)

openapi_python_client/parser/responses.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ def response_from_data(
105105
if response_type == ResponseType.AUTO:
106106
failed_status = status_code < HTTPStatus.OK or status_code >= HTTPStatus.MULTIPLE_CHOICES
107107
else:
108-
failed_status = response_type == ResponseType.FAILED
108+
failed_status = response_type == ResponseType.FAILURE
109109

110110
prop, schemas = property_from_data(
111111
name=response_name,

0 commit comments

Comments
 (0)