Django - How to add swagger auto schema to DRF tagged functions with @api_view?
I have this function
view.py
@api_view(['POST'])
@swagger_auto_schema(
request_body=PostSerializer,
operation_description="Create a post object"
)
def post_create_post(request):
But the request body data requirements aren't showing up in Swagger UI. How do you add swagger documentation to endpoints created using @api_view? Also I'd ideally like to add a list of parameters with their types to the swagger schema.