Skip to content

Commit 5196b25

Browse files
chore: Align Actor task publication models with the published OpenAPI spec (#1007)
Merges current master and regenerates the models from the published OpenAPI specification (`v2-2026-08-05T133145Z` -> `v2-2026-08-14T072928Z`). - Drops `TaskPublicConfig.categorization`, which is not present in the published spec. - Restores the `max_length` constraints on `seo_title` (60) and `seo_description` (160). - Takes the spec's wording for the related docstrings. - No released API surface changes - the task publication feature itself first ships in 3.1.4. ✍️ Drafted by Claude Code --- Co-authored-by: Vlada Dusek <v.dusek96@gmail.com>
1 parent 13b0d1c commit 5196b25

2 files changed

Lines changed: 29 additions & 27 deletions

File tree

‎pyproject.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ keep_model_order = true
257257
# workflow committing nothing unless the models changed. A local regeneration that only moves this line is that
258258
# same case - drop it rather than committing it alone.
259259
[tool.apify.openapi-spec]
260-
version = "v2-2026-08-05T133145Z"
260+
version = "v2-2026-08-14T072928Z"
261261

262262
[tool.uv]
263263
# Minimal defense against supply-chain atatcks.

‎src/apify_client/_models.py‎

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -885,9 +885,8 @@ class CreateTaskRequest(BaseModel):
885885
actor_standby: ActorStandby | None = None
886886
public_config: TaskPublicConfig | None = None
887887
"""
888-
Public-facing display configuration of the task's public landing page. The task is not
889-
published by setting it — set `isPublic` via the [Update task](https://docs.apify.com/api/v2/actor-task-put)
890-
endpoint for that. Setting `publicConfig` requires write permission to the task's Actor.
888+
Configuration that controls how the published task appears on its public landing page.
889+
Editing this object requires write permission to the Actor that the task belongs to.
891890
892891
"""
893892

@@ -3505,9 +3504,7 @@ class Task(BaseModel):
35053504
standby_url: AnyUrl | None = None
35063505
is_public: Annotated[bool | None, Field(examples=[False])] = None
35073506
"""
3508-
Whether the task is published on its public landing page. Derived from
3509-
`publicConfig.publishedAt`. Set it via the [Update task](https://docs.apify.com/api/v2/actor-task-put)
3510-
endpoint to publish or unpublish the task.
3507+
Whether the task is published. Based on the `publicConfig.publishedAt` field.
35113508
35123509
"""
35133510
public_config: TaskPublicConfig | None = None
@@ -3557,34 +3554,39 @@ class TaskPublicConfig(BaseModel):
35573554
)
35583555
published_at: Annotated[AwareDatetime | None, Field(examples=['2025-06-16T09:20:45.777Z'])] = None
35593556
"""
3560-
Time when the task was published, or `null` if the task is not published.
3561-
This field is server-controlled - to publish or unpublish a task, set `isPublic`
3562-
via the [Update task](https://docs.apify.com/api/v2/actor-task-put) endpoint.
3557+
Time when the task was published, or `null` if the task isn't published.
3558+
This field is server-controlled. To publish or unpublish a task, use the
3559+
[Update task](https://docs.apify.com/api/v2/actor-task-put) endpoint and set `isPublic`.
35633560
35643561
"""
3565-
seo_title: Annotated[str | None, Field(examples=['Scrape data from a website'])] = None
3562+
seo_title: Annotated[str | None, Field(examples=['Scrape data from a website'], max_length=60)] = None
35663563
"""
3567-
SEO title of the public task page. Defaults to the task title when not set.
3568-
"""
3569-
seo_description: str | None = None
3570-
"""
3571-
SEO description of the public task page. Defaults to the task description when not set.
3564+
Name of the Actor task to display by search engines such as Google. Defaults to the task
3565+
title. At most 60 characters.
3566+
35723567
"""
3573-
categorization: str | None = None
3568+
seo_description: Annotated[str | None, Field(max_length=160)] = None
35743569
"""
3575-
Use-case category of the public task.
3570+
Description of the Actor task to display by search engines such as Google. Defaults to the
3571+
task description. At most 160 characters.
3572+
35763573
"""
35773574
input_schema_fields: list[str] | None = None
35783575
"""
35793576
Names of the task input fields displayed on the public task page.
35803577
"""
35813578
dataset_name: str | None = None
35823579
"""
3583-
Name of the dataset from the Actor's dataset schema whose results are displayed.
3580+
Name of the dataset from the Actor's dataset schema whose results are displayed. When
3581+
`null`, the Actor's default dataset is used. That is, the only dataset the Actor declares,
3582+
or the one named `default` when it declares several.
3583+
35843584
"""
35853585
dataset_view: str | None = None
35863586
"""
3587-
Key of the dataset view from the Actor's dataset schema used to display results.
3587+
Key of the dataset view from the Actor's dataset schema used to display results. Must be
3588+
one of the views declared on the resolved dataset. You can't publish a task without it.
3589+
35883590
"""
35893591

35903592

@@ -3865,18 +3867,18 @@ class UpdateTaskRequest(BaseModel):
38653867
actor_standby: ActorStandby | None = None
38663868
public_config: TaskPublicConfig | None = None
38673869
"""
3868-
Public-facing display configuration of the task's public landing page. The provided
3869-
fields are merged into the stored configuration and validated. The stored configuration
3870-
cannot be cleared this way. Set `isPublic` to change the publication state.
3871-
Updating `publicConfig` requires write permission to the task's Actor.
3870+
Configuration that controls how the published task appears on its public landing page.
3871+
Editing this object requires write permission to the Actor that the task belongs to.
3872+
3873+
The fields you send are merged into the stored configuration, so you only need to include
3874+
the ones you're changing. To clear a field, set it to `null`. Sending `publicConfig: null`
3875+
is rejected, so the object as a whole can't be cleared.
38723876
38733877
"""
38743878
is_public: Annotated[bool | None, Field(examples=[True])] = None
38753879
"""
38763880
Set to `true` to publish the task on its public landing page, or `false` to unpublish it.
3877-
Sending the value the task already has does nothing. Publishing requires the task's
3878-
`publicConfig` to be filled in and write permission to the task's Actor; it fails if the
3879-
task is not ready to be published, leaving the rest of the update unapplied.
3881+
Sending the value the task already has does nothing.
38803882
38813883
"""
38823884

0 commit comments

Comments
 (0)