配置环境 pip install drf_yasg pip install drf_generators pip install packaging 配置路由 from drf_yasg import openapi # from rest_framework import permissions from drf_yasg.views import get_schema_view schema_view = get_schema_view( openapi.Info( title="API 接口文档", default_version='v1'