diff --git a/rest_framework/schemas/openapi.py b/rest_framework/schemas/openapi.py index eb4528df7..1db20a9d4 100644 --- a/rest_framework/schemas/openapi.py +++ b/rest_framework/schemas/openapi.py @@ -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'