Django_Rest_Framework generate API document

Install required package

pip3 install coreapi

Set the schema in settings.py

REST_FRAMEWORK = {
"DEFAULT_SCHEMA_CLASS": "rest_framework.schemas.coreapi.AutoSchema"
}

Set the correspond url in urls.py

from rest_framework.documentation import include_docs_urls

urlpatterns = [
path(r'admin/', admin.site.urls),
path(r"api/doc/", include_docs_urls(title="API Document"))
]