Skip to content

fix(openapi): Update OpenAPI schemas to match API behaviour#2291

Merged
vdusek merged 2 commits intomasterfrom
fix/openapi-specs-pydantic-models
Feb 27, 2026
Merged

fix(openapi): Update OpenAPI schemas to match API behaviour#2291
vdusek merged 2 commits intomasterfrom
fix/openapi-specs-pydantic-models

Conversation

@vdusek
Copy link
Contributor

@vdusek vdusek commented Feb 27, 2026

Summary

  • Adds missing ActorStandby schema, missing fields (actorStandby, exampleRunInput, isDeprecated, title, maxItems, forcePermissionLevel), and removes incorrect required constraints from request schemas.
  • Cleans up UpdateTaskRequest to only contain mutable fields (removes read-only fields like id, userId, createdAt, etc.).

Related PRs

Test plan

  • CI passes
  • Ran datamodel-codegen against the bundled spec

🤖 Generated with Claude Code

These changes align the OpenAPI specs with the Pydantic models generated
for apify-client-python (PR apify/apify-client-python#650), so that
`datamodel-codegen` produces matching output without manual edits.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@vdusek vdusek added adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team. labels Feb 27, 2026
@vdusek vdusek self-assigned this Feb 27, 2026
@vdusek vdusek requested a review from Pijukatel February 27, 2026 09:50
@github-actions github-actions bot added this to the 135th sprint - Tooling team milestone Feb 27, 2026
@apify-service-account
Copy link

Preview for this PR was built for commit 6c0d960 and is ready at https://pr-2291.preview.docs.apify.com!

@vdusek vdusek changed the title fix: Update OpenAPI schemas to match Python Pydantic request models fix(openapi): Update OpenAPI schemas to match Python Pydantic request models Feb 27, 2026
@vdusek vdusek changed the title fix(openapi): Update OpenAPI schemas to match Python Pydantic request models fix(openapi): Update OpenAPI schemas to match API behaviour Feb 27, 2026
Remove read-only fields from the request example that were removed
from the UpdateTaskRequest schema.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Member

@fnesveda fnesveda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for cleaning this up!

@vdusek vdusek merged commit c49d6b8 into master Feb 27, 2026
13 checks passed
@vdusek vdusek deleted the fix/openapi-specs-pydantic-models branch February 27, 2026 10:04
vdusek added a commit to apify/apify-client-python that referenced this pull request Feb 27, 2026
…650)

## Summary

- Replace hand-written `_representations.py` helper functions (302 lines
deleted) with Pydantic request models (`UpdateActorRequest`,
`ScheduleCreate`, `WebhookCreate`, `WebhookUpdate`, etc.) for
constructing API payloads.
- Simplify `_update()` / `_create()` in `ResourceClient` to accept
`**kwargs` and use a new `_clean_json_payload()` static method on
`ResourceClientBase` instead of the removed `filter_none_values()`
utility.
- Remove unused `enum_to_value()` and `filter_none_values()` from
`_utils.py` — Pydantic serialization handles enum conversion and `None`
filtering.
- Add `populate_by_name=True` to all generated Pydantic model configs
via `datamodel-codegen` configuration, so models can be initialized
using either `snake_case` field names or `camelCase` aliases.
- Models had to be adjusted, see PR to apify-docs -
apify/apify-docs#2291.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants