Skip to content

Add deprecated camelCase aliases to Pydantic model fields #706

Closed as not planned

Description

@vdusek

Context

In v2, resource client methods returned plain dicts with camelCase keys (e.g. run['defaultDatasetId']). In v3, they return Pydantic models with snake_case attributes (e.g. run.default_dataset_id).

To ease migration, we should add camelCase attribute access as deprecated aliases on the Pydantic models. For example, run.defaultDatasetId would still work but emit a deprecation warning pointing users to run.default_dataset_id.

References

Activity

  1. added
    t-toolingIssues with this label are in the ownership of the tooling team.
    on Apr 8, 2026
  2. added this to the 3.0 milestone on Apr 8, 2026
  3. self-assigned this
    on May 3, 2026
  4. vdusek commented on May 14, 2026

    @vdusek
    ContributorAuthor

    Here, we would have to introduce a custom ApifyBaseModel(BaseModel) with an overridden __getattr__ dunder method and update the postprocess script. Do we want to do that? I'm for #756 but not sure about this 🙂. Or did you think about something else? cc @janbuchar

  5. vdusek commented on May 18, 2026

    @vdusek
    ContributorAuthor

    Closing as not planned after discussion with @janbuchar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

t-toolingIssues with this label are in the ownership of the tooling team.

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions