Slide 31
Slide 31 text
urlpatterns = [
path('', include(router.urls)),
path('openapi', get_schema_view(
title='Your Project',
description='API for all things …',
version='1.0.0'
), name='openapi-schema'),
path('swagger-ui/', TemplateView.as_view(
template_name='swagger-ui.html',
extra_context={'schema_url': 'openapi-schema'}
), name='swagger-ui'),
]
mysite/mysite/urls.py