SerializerMethodField - dict with known keys #184
Labels
enhancement
New feature or request
fix confirmation pending
issue has been fixed and confirmation from issue reporter is pending
low priority
issues that would be nice to fix but have low impact
Hey, let's assume we have this field in a serializer:
Is there a way to represent it as:
I've tried:
typing.TypedDict
as type hint toget_field
- results in "Unknown type hint"@extend_schema_field
accepts only either serializer orOpenApiTypes
. I don't see a way to editadditionalProperties
forOpenApiTypes.OBJECT
.Seems like a common problem to me. Any ideas?
The text was updated successfully, but these errors were encountered: