mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-30 01:49:50 +03:00
Fixed JsonField schema reuturn type.
This commit is contained in:
parent
600d1ee004
commit
522017f895
|
@ -45,7 +45,6 @@ def _get_field_type(field):
|
|||
}.get(field.__class__, default_return)
|
||||
|
||||
|
||||
|
||||
def field_to_schema(field):
|
||||
title = force_text(field.label) if field.label else ''
|
||||
description = force_text(field.help_text) if field.help_text else ''
|
||||
|
@ -120,6 +119,8 @@ def field_to_schema(field):
|
|||
description=description,
|
||||
format='date-time'
|
||||
)
|
||||
elif isinstance(field, serializers.JSONField):
|
||||
return coreschema.Object(title=title, description=description)
|
||||
|
||||
if field.style.get('base_template') == 'textarea.html':
|
||||
return coreschema.String(
|
||||
|
|
Loading…
Reference in New Issue
Block a user