4

In drf-spectacular swagger, post method have 3 content types as below

application/json
application/x-www-form-urlencoded
multipart/form-data

Is there anyway to make "application/x-www-form-urlencoded" as default content type for my post method.

@extend_schema(
    description='API authentication using email & password',
    # OpenApiRequestBody('content': "application/x-www-form-urlencoded")
)

In extend_schema function, tried to add content type as form-urlencoded. but no luck.

Thanks in advance

0 Answers0