Describe the bug
OpenApiParameter with the native Python float type is formatted as a 32-bit float rather than 64-bit double.
Related to #674
To Reproduce
Use drf-spectacular 0.22.0.
input_param = OpenApiParameter(
name="input",
description="Description",
type=float,
default=1.0,
)
class MyViewSet(RetrieveModelMixin, GenericViewSet):
@extend_schema(parameters=[input_param])
def retrieve(self, request: Request, *args: Any, **kwargs: str) -> Response:
...
The resulting schema:
schema:
type: number
format: float
default: 1.0
Expected behavior
Expected schema
schema:
type: number
format: double
default: 1.0
Describe the bug
OpenApiParameterwith the native Pythonfloattype is formatted as a 32-bitfloatrather than 64-bitdouble.Related to #674
To Reproduce
Use
drf-spectacular0.22.0.The resulting schema:
Expected behavior
Expected schema