diff --git a/purldb_public_project/urls.py b/purldb_public_project/urls.py index a2a779e4..31f4fc20 100644 --- a/purldb_public_project/urls.py +++ b/purldb_public_project/urls.py @@ -17,6 +17,8 @@ from packagedb.api import PackagePublicViewSet from packagedb.api import PurlValidateViewSet from packagedb.api import ResourceViewSet +from drf_spectacular.views import SpectacularAPIView +from drf_spectacular.views import SpectacularSwaggerView api_router = routers.DefaultRouter() @@ -32,4 +34,6 @@ ), path('api/', include((api_router.urls, 'api'))), path('', RedirectView.as_view(url='api/')), + path('api/schema/', SpectacularAPIView.as_view(), name='schema'), + path('api/docs/', SpectacularSwaggerView.as_view(url_name='schema'), name='swagger-ui'), ]