Skip to content

Commit

Permalink
Change response type: failed->failure
Browse files Browse the repository at this point in the history
  • Loading branch information
lee-elenbaas committed Feb 7, 2023
1 parent a0d5bf7 commit 99cd9ec
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion openapi_python_client/parser/properties/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

class ResponseType(Enum):
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
FAILED = 'failed' # Explicitly specified failed response
FAILURE = 'failure' # Explicitly specified failed response
SUCCESS = 'success' # Explicitly specified success response


Expand Down
2 changes: 1 addition & 1 deletion openapi_python_client/parser/responses.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def response_from_data(
if response_type == ResponseType.AUTO:
failed_status = status_code < HTTPStatus.OK or status_code >= HTTPStatus.MULTIPLE_CHOICES
else:
failed_status = response_type == ResponseType.FAILED
failed_status = response_type == ResponseType.FAILURE

prop, schemas = property_from_data(
name=response_name,
Expand Down

0 comments on commit 99cd9ec

Please sign in to comment.