mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-28 00:49:49 +03:00
add ref for number
includes integer
This commit is contained in:
parent
96119603e4
commit
94af9e138c
|
@ -218,6 +218,7 @@ class AutoSchema(ViewInspector):
|
|||
elif all(isinstance(choice, int) for choice in choices):
|
||||
type = 'integer'
|
||||
elif all(isinstance(choice, (int, float, Decimal)) for choice in choices): # `number` includes `integer`
|
||||
# SEE: https://tools.ietf.org/html/draft-wright-json-schema-validation-00#section-5.21
|
||||
type = 'number'
|
||||
elif all(isinstance(choice, str) for choice in choices):
|
||||
type = 'string'
|
||||
|
|
Loading…
Reference in New Issue
Block a user