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
{{ message }}
Repository navigation
Use alias_generator=to_camel on Pydantic models instead of manual per-field aliases #949
We're on Pydantic ≥2.11. Models in src/apify/_models.py and src/apify/storage_clients/_apify/_models.py map snake_case fields to the Apify API's camelCase, declaring each alias by hand:
Fields then become actor_id: str | None = None and still bind to actorId. Currently 19 models repeat ConfigDict(populate_by_name=True, ...) while 11 (events in events/_types.py, the request-loader input models) have no config at all. A single base model carrying the config (including the generator) would cover both gaps.
Where it makes sense
Apply to the API-response models that already use camelCase aliases.
Keep explicit Field(alias=...) where the generated key would differ.
Subclasses of Crawlee storage models (ApifyKeyValueStoreMetadata, ApifyRequestQueueMetadata) should follow whatever Crawlee adopts.
Event models carry protocol-defined names, so check each before switching.
Scope
Refactor only. Generated aliases must match the current ones, guarded by tests.
Activity