def document_func_view(serializer_class=None,<EOL>response_serializer_class=None,<EOL>filter_backends=None,<EOL>permission_classes=None,<EOL>authentication_classes=None,<EOL>doc_format_args=list(),<EOL>doc_format_kwargs=dict()):
def decorator(func):<EOL><INDENT>if serializer_class:<EOL><INDENT>func.cls.serializer_class = func.view_class.serializer_class = serializer_class<EOL><DEDENT>if response_serializer_class:<EOL><INDENT>func.cls.response_serializer_class = func.view_class.response_serializer_class = response_serializer_class<EOL><DEDENT>if filter_backends:<EOL><INDENT>func.cls.filter_backends = func.view_class.filter_backends = filter_backends<EOL><DEDENT>if permission_classes:<EOL><INDENT>func.cls.permission_classes = func.view_class.permission_classes = permission_classes<EOL><DEDENT>if authentication_classes:<EOL><INDENT>func.cls.authentication_classes = func.view_class.authentication_classes = authentication_classes<EOL><DEDENT>if doc_format_args or doc_format_kwargs:<EOL><INDENT>func.cls.__doc__ = func.view_class.__doc__ = getdoc(func).format(*doc_format_args, **doc_format_kwargs)<EOL><DEDENT>return func<EOL><DEDENT>return decorator<EOL>
Decorator to make functional view documentable via drf-autodocs