Skip to content

Commit 5bc45ae

Browse files
committed
update autogen lib
1 parent f1c66b8 commit 5bc45ae

28 files changed

+155
-206
lines changed

taskbadger.yaml

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -710,6 +710,11 @@ components:
710710
nullable: true
711711
description: Datetime when status is set to a terminal value.Can be set
712712
via the API.
713+
time_to_start:
714+
type: string
715+
nullable: true
716+
description: Duration between task creation and when status first changes
717+
from pending. (seconds)
713718
max_runtime:
714719
type: integer
715720
maximum: 2147483647
@@ -724,14 +729,6 @@ components:
724729
nullable: true
725730
description: Maximum time to allow between task updates before considering
726731
the task stale. (seconds)
727-
tags:
728-
type: object
729-
additionalProperties:
730-
type: string
731-
minLength: 2
732-
maxLength: 255
733-
description: Tags for the task represented as a mapping from 'namespace'
734-
to 'value'.
735732
StatusEnum:
736733
enum:
737734
- pending
@@ -813,6 +810,11 @@ components:
813810
nullable: true
814811
description: Datetime when status is set to a terminal value.Can be set
815812
via the API.
813+
time_to_start:
814+
type: string
815+
nullable: true
816+
description: Duration between task creation and when status first changes
817+
from pending. (seconds)
816818
max_runtime:
817819
type: integer
818820
maximum: 2147483647
@@ -839,6 +841,7 @@ components:
839841
type: string
840842
maxLength: 255
841843
minLength: 2
844+
readOnly: true
842845
description: Tags for the task represented as a mapping from 'namespace'
843846
to 'value'.
844847
required:
@@ -848,6 +851,7 @@ components:
848851
- organization
849852
- project
850853
- public_url
854+
- tags
851855
- updated
852856
- url
853857
- value_percent
@@ -891,6 +895,11 @@ components:
891895
nullable: true
892896
description: Datetime when status is set to a terminal value.Can be set
893897
via the API.
898+
time_to_start:
899+
type: string
900+
nullable: true
901+
description: Duration between task creation and when status first changes
902+
from pending. (seconds)
894903
max_runtime:
895904
type: integer
896905
maximum: 2147483647
@@ -905,14 +914,6 @@ components:
905914
nullable: true
906915
description: Maximum time to allow between task updates before considering
907916
the task stale. (seconds)
908-
tags:
909-
type: object
910-
additionalProperties:
911-
type: string
912-
minLength: 2
913-
maxLength: 255
914-
description: Tags for the task represented as a mapping from 'namespace'
915-
to 'value'.
916917
required:
917918
- name
918919
securitySchemes:
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"""Contains endpoint functions for accessing the API"""

taskbadger/internal/api/action_endpoints/action_cancel.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ def _get_kwargs(
2626
def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]:
2727
if response.status_code == 204:
2828
return None
29+
2930
if client.raise_on_unexpected_status:
3031
raise errors.UnexpectedStatus(response.status_code, response.content)
3132
else:

taskbadger/internal/api/action_endpoints/action_create.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,8 @@ def _get_kwargs(
2424
"url": f"/api/{organization_slug}/{project_slug}/tasks/{task_id}/actions/",
2525
}
2626

27-
_body = body.to_dict()
27+
_kwargs["json"] = body.to_dict()
2828

29-
_kwargs["json"] = _body
3029
headers["Content-Type"] = "application/json"
3130

3231
_kwargs["headers"] = headers
@@ -38,6 +37,7 @@ def _parse_response(*, client: Union[AuthenticatedClient, Client], response: htt
3837
response_201 = Action.from_dict(response.json())
3938

4039
return response_201
40+
4141
if client.raise_on_unexpected_status:
4242
raise errors.UnexpectedStatus(response.status_code, response.content)
4343
else:

taskbadger/internal/api/action_endpoints/action_get.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ def _parse_response(*, client: Union[AuthenticatedClient, Client], response: htt
2929
response_200 = Action.from_dict(response.json())
3030

3131
return response_200
32+
3233
if client.raise_on_unexpected_status:
3334
raise errors.UnexpectedStatus(response.status_code, response.content)
3435
else:

taskbadger/internal/api/action_endpoints/action_list.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ def _parse_response(
3434
response_200.append(response_200_item)
3535

3636
return response_200
37+
3738
if client.raise_on_unexpected_status:
3839
raise errors.UnexpectedStatus(response.status_code, response.content)
3940
else:

taskbadger/internal/api/action_endpoints/action_partial_update.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,8 @@ def _get_kwargs(
2626
"url": f"/api/{organization_slug}/{project_slug}/tasks/{task_id}/actions/{id}/",
2727
}
2828

29-
_body = body.to_dict()
29+
_kwargs["json"] = body.to_dict()
3030

31-
_kwargs["json"] = _body
3231
headers["Content-Type"] = "application/json"
3332

3433
_kwargs["headers"] = headers
@@ -40,6 +39,7 @@ def _parse_response(*, client: Union[AuthenticatedClient, Client], response: htt
4039
response_200 = Action.from_dict(response.json())
4140

4241
return response_200
42+
4343
if client.raise_on_unexpected_status:
4444
raise errors.UnexpectedStatus(response.status_code, response.content)
4545
else:

taskbadger/internal/api/action_endpoints/action_update.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,8 @@ def _get_kwargs(
2626
"url": f"/api/{organization_slug}/{project_slug}/tasks/{task_id}/actions/{id}/",
2727
}
2828

29-
_body = body.to_dict()
29+
_kwargs["json"] = body.to_dict()
3030

31-
_kwargs["json"] = _body
3231
headers["Content-Type"] = "application/json"
3332

3433
_kwargs["headers"] = headers
@@ -40,6 +39,7 @@ def _parse_response(*, client: Union[AuthenticatedClient, Client], response: htt
4039
response_200 = Action.from_dict(response.json())
4140

4241
return response_200
42+
4343
if client.raise_on_unexpected_status:
4444
raise errors.UnexpectedStatus(response.status_code, response.content)
4545
else:
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"""Contains endpoint functions for accessing the API"""

taskbadger/internal/api/task_endpoints/task_cancel.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ def _get_kwargs(
2525
def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]:
2626
if response.status_code == 204:
2727
return None
28+
2829
if client.raise_on_unexpected_status:
2930
raise errors.UnexpectedStatus(response.status_code, response.content)
3031
else:

0 commit comments

Comments
 (0)