url.py
from django.urls import path, include
from rest_framework.routers import DefaultRouter
from drf_yasg.views import get_schema_view
from drf_yasg import openapi
from .views import UserViewSet
schema_view = get_schema_view( # 文档视图
openapi.Info(
title='mytwoapp API DOC',
default_version='v1',
description='mytwoapp接口文档',
terms_of_service='https://www.baidu.com',
contact=openapi.Contact(email='baidu@126.com', url='https://www.baidu.com'),
license=openapi.License(name='BSD License')