Skip to content

Commit 89ac756

Browse files
fix: Add the description field to Actor task models (#1049)
Regenerates the models from the [published OpenAPI specification](https://docs.apify.com/api/openapi.json), version `v2-2026-08-30T172245Z` -> `v2-2026-08-31T125154Z` (the stamp lags its content by one deploy; the content is from 2026-09-02). - Adds the `description` field to `Task`, `CreateTaskRequest`, and `UpdateTaskRequest` (apify/apify-docs#2922). - Sets `collapse_root_models_name_strategy = "child"` for datamodel-codegen. apify/apify-docs#2938 bumped `@redocly/cli` 2.26.0 -> 2.49.0, and its bundler now keeps the shared `RequestMethod` alias (a `$ref` to `HttpMethod` plus a description) as a separate component instead of collapsing it. datamodel-codegen turned that into a `RequestMethod(RootModel[HttpMethod])` wrapper, so `request.method` no longer compared equal to plain strings and the request queue integration tests failed. With the option the alias folds back into `HttpMethod`, and the generated models are identical to the previous bundler's output. > Generated by the [Regenerate models](https://github.com/apify/apify-client-python/actions/workflows/on_schedule_regenerate_models.yaml) workflow. *✍️ Drafted by Claude Code* --------- Co-authored-by: Vlada Dusek <v.dusek96@gmail.com>
1 parent ab25d07 commit 89ac756

3 files changed

Lines changed: 11 additions & 1 deletion

File tree

‎pyproject.toml‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,7 @@ use_field_description = true
222222
use_union_operator = true
223223
capitalise_enum_members = true
224224
collapse_root_models = true
225+
collapse_root_models_name_strategy = "child"
225226
set_default_enum_member = true
226227
use_annotated = true
227228
wrap_string_literal = true
@@ -245,7 +246,7 @@ keep_model_order = true
245246
# workflow committing nothing unless the models changed. A local regeneration that only moves this line is that
246247
# same case - drop it rather than committing it alone.
247248
[tool.apify.openapi-spec]
248-
version = "v2-2026-08-30T172245Z"
249+
version = "v2-2026-08-31T125154Z"
249250

250251
[tool.uv]
251252
# Minimal defense against supply-chain atatcks.

‎src/apify_client/_models.py‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -872,6 +872,7 @@ class CreateTaskRequest(BaseModel):
872872
options: TaskOptions | None = None
873873
input: TaskInput | list[TaskInput] | None = None
874874
title: str | None = None
875+
description: str | None = None
875876
actor_standby: ActorStandby | None = None
876877
public_config: TaskPublicConfig | None = None
877878
"""
@@ -3505,6 +3506,7 @@ class Task(BaseModel):
35053506
options: TaskOptions | None = None
35063507
input: TaskInput | list[TaskInput] | None = None
35073508
title: str | None = None
3509+
description: str | None = None
35083510
actor_standby: ActorStandby | None = None
35093511
standby_url: AnyUrl | None = None
35103512
is_public: Annotated[bool | None, Field(examples=[False])] = None
@@ -3869,6 +3871,7 @@ class UpdateTaskRequest(BaseModel):
38693871
options: TaskOptions | None = None
38703872
input: TaskInput | list[TaskInput] | None = None
38713873
title: str | None = None
3874+
description: str | None = None
38723875
actor_standby: ActorStandby | None = None
38733876
public_config: TaskPublicConfig | None = None
38743877
"""

‎src/apify_client/_typeddicts.py‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ class RequestBaseDict(TypedDict):
1818
The URL of the request.
1919
"""
2020
method: NotRequired[Literal['GET', 'HEAD', 'POST', 'PUT', 'DELETE', 'CONNECT', 'OPTIONS', 'TRACE', 'PATCH']]
21+
"""
22+
The HTTP method of the request.
23+
"""
2124
retry_count: NotRequired[int]
2225
"""
2326
The number of times this request has been retried.
@@ -60,6 +63,9 @@ class RequestBaseCamelDict(TypedDict):
6063
The URL of the request.
6164
"""
6265
method: NotRequired[Literal['GET', 'HEAD', 'POST', 'PUT', 'DELETE', 'CONNECT', 'OPTIONS', 'TRACE', 'PATCH']]
66+
"""
67+
The HTTP method of the request.
68+
"""
6369
retryCount: NotRequired[int]
6470
"""
6571
The number of times this request has been retried.

0 commit comments

Comments
 (0)