Why is this needed?
Path, Query, Header, Cookie all inherit from Param but each one copies the entire __init__ with 25+ parameters. The __init__ can live only in Param. Subclasses just set in_ and override specific behavior (e.g. Header has convert_underscores).
Same story for Body/Form/File.
Steps:
- Move the full
__init__ to Param base class
- Subclasses override only what differs (default value, alias behavior)
- Keep class names and import paths identical
- Verify Pydantic FieldInfo compatibility
Which area does this relate to?
Event Handler - REST API
Suggestion
No response
Acknowledgment
Why is this needed?
Path, Query, Header, Cookie all inherit from Param but each one copies the entire
__init__with 25+ parameters. The__init__can live only in Param. Subclasses just setin_and override specific behavior (e.g. Header hasconvert_underscores).Same story for Body/Form/File.
Steps:
__init__to Param base classWhich area does this relate to?
Event Handler - REST API
Suggestion
No response
Acknowledgment