Fix extend_schema_field type hint to allow a Field type #569
Labels
enhancement
New feature or request
fix confirmation pending
issue has been fixed and confirmation from issue reporter is pending
drf-spectacular/drf_spectacular/utils.py
Lines 401 to 402 in 9ab8d44
I would suggest also allowing
Type[Field]
to be passed in. I tried it out and it seems to work, but type checking will fail unless you pass an instance.Perhaps it would make more sense to only allow passing in
Type[Field]
? Not sure why an instance would make sense in this context (butSerializer
instances are also currently allowed, so to be consistent it should probably allowField
instances too).The text was updated successfully, but these errors were encountered: