mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-28 00:49:49 +03:00
fixup! Corrected OpenAPI schema type for DecimalField
This commit is contained in:
parent
91767682a3
commit
f80d7be282
|
@ -444,7 +444,7 @@ class AutoSchema(ViewInspector):
|
|||
return content
|
||||
|
||||
if isinstance(field, serializers.DecimalField):
|
||||
if field.coerce_to_string:
|
||||
if getattr(field, 'coerce_to_string', api_settings.COERCE_DECIMAL_TO_STRING):
|
||||
return {
|
||||
'type': 'string',
|
||||
'format': 'decimal',
|
||||
|
|
Loading…
Reference in New Issue
Block a user