You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The spec change mostly relaxes fields that were declared required but can be absent in real API responses, so deserializing such responses no longer raises a ValidationError:
BuildStats.compute_units and RunStats.compute_units are now optional.
RunStats.restart_count and RunStats.resurrect_count are now optional.
KeyValueStoreStats.read_count, write_count, delete_count and list_count are now optional.
WebhookStats.total_dispatches is now optional.
Webhook.request_url is now optional - it is omitted or null for hook actions other than the conventional HTTP case (e.g. Slack or email notifications). Documented on both Webhook and WebhookDispatchWebhookSummary.
StoreListActor.current_pricing_info is now optional.
UserPrivateInfo.proxy is now optional.
RunOptions.max_items now allows 0 (constraint relaxed from ge=1 to ge=0).
New error code literal: cannot-monetize-without-payout-billing-info.
Docs: TaggedBuildInfo.build_number notes it can be null for legacy builds; the Dataset.schema docs link now points to https://docs.apify.com/storage/dataset-schema.
vdusek
changed the title
TODO
fix: Make generated model fields that the API can omit as optional
Jul 28, 2026
vdusek
changed the title
fix: Make generated model fields that the API can omit as optional
fix: Mark generated model fields that the API can omit as optional
Jul 28, 2026
Closing as superseded - this PR no longer carries any changes.
Everything it contained has already landed on master through separate PRs: #923, #936, #941, #947, #960, #974. After merging master into this branch and resolving the _literals.py conflict, the resulting tree is byte-identical to master.
The conflict was a symptom of a workflow bug rather than a real spec change. The manual regeneration branch (update-models-manual) is reused indefinitely and never rebased onto master, so the second run checked out the 20-day-old branch tip and regenerated the models with the codegen tooling from that stale commit. That tooling predates #941, so _literals.py came out in the old closed Literal[...] form - merging this PR would have silently reverted the enum relaxation from #941.
The underlying issues in manual_regenerate_models.yaml will be addressed separately.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
t-toolingIssues with this label are in the ownership of the tooling team.
2 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Regenerates the auto-generated Pydantic models and TypedDicts from the latest published OpenAPI specification.
The spec change mostly relaxes fields that were declared required but can be absent in real API responses, so deserializing such responses no longer raises a
ValidationError:BuildStats.compute_unitsandRunStats.compute_unitsare now optional.RunStats.restart_countandRunStats.resurrect_countare now optional.KeyValueStoreStats.read_count,write_count,delete_countandlist_countare now optional.WebhookStats.total_dispatchesis now optional.Webhook.request_urlis now optional - it is omitted ornullfor hook actions other than the conventional HTTP case (e.g. Slack or email notifications). Documented on bothWebhookandWebhookDispatchWebhookSummary.StoreListActor.current_pricing_infois now optional.UserPrivateInfo.proxyis now optional.RunOptions.max_itemsnow allows0(constraint relaxed fromge=1toge=0).cannot-monetize-without-payout-billing-info.TaggedBuildInfo.build_numbernotes it can benullfor legacy builds; theDataset.schemadocs link now points tohttps://docs.apify.com/storage/dataset-schema.✍️ Drafted by Claude Code