Pydantic: create `__init__` overloads when validating by both name and alias
Open
needs-discussion
overloads
pydantic
- Dominant language
- Rust
- Stars
- 7k
- Forks
- 516
- PR merge metrics
- No merged PRs in 30d
Description
### Describe the Bug
```
class Model4(BaseModel, validate_by_name=True, validate_by_alias=True):
x: int = Field(alias="y")
# ❓ Overloads? (May incur combinatorial explosion)
reveal_type(Model4.__init__) # (self: Model4, *, x: Any = ..., y: Any = ..., **Unknown) -> None
```
Needs further discussion, since a naive implementation wouldn't scale well.
### Sandbox Link
_No response_
### (Only applicable for extension issues) IDE Information
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.