I am trying to use a nested serializer to enforce schema of a JSONField, which is a list of objects with specific fields. I pass the many=True flag to the nested serialized, but the auto-generated JSON form, html form, and schema does not show the required fields of the JSONField objects. The JSONField ("types" here) shows up as an empty array:
{
"types": [],
"shape": null
}
Is there any way for me to set the minimum number of items required along with the many=True flag? I assume that would show the fields of the nested serializer in the raw JSON input of the Django Rest Framework. Is there any better solution?