diff --git a/mayan/apps/rest_api/api_views.py b/mayan/apps/rest_api/api_views.py index e14b2b9da3..503ff9499a 100644 --- a/mayan/apps/rest_api/api_views.py +++ b/mayan/apps/rest_api/api_views.py @@ -11,6 +11,8 @@ from .serializers import EndpointSerializer class APIRoot(APIView): + swagger_schema = None + def get(self, request, format=None): """ Return a list of all users. diff --git a/mayan/apps/rest_api/apps.py b/mayan/apps/rest_api/apps.py index 1e8d2c4198..d3aadd1fb0 100644 --- a/mayan/apps/rest_api/apps.py +++ b/mayan/apps/rest_api/apps.py @@ -24,7 +24,9 @@ class RESTAPIApp(MayanAppConfig): settings.STRONGHOLD_PUBLIC_URLS += (r'^/%s/.+$' % self.app_url,) menu_tools.bind_links( - links=(link_api_documentation, link_api_documentation_redoc) + links=( + link_api, link_api_documentation, link_api_documentation_redoc + ) ) for app in apps.get_app_configs(): diff --git a/mayan/apps/rest_api/urls.py b/mayan/apps/rest_api/urls.py index fbf56fb369..33a3a7bed8 100644 --- a/mayan/apps/rest_api/urls.py +++ b/mayan/apps/rest_api/urls.py @@ -6,11 +6,7 @@ from .api_views import APIRoot, BrowseableObtainAuthToken api_urls = [ - # FIXME: Defining a root API path confuses Swagger which then - # groups all endpoints into a single dropdown. Disable until a - # workaround is found for Swagger. - - # url(r'^$', APIRoot.as_view(), name='api_root'), + url(r'^$', APIRoot.as_view(), name='api_root'), url( r'^auth/token/obtain/$', BrowseableObtainAuthToken.as_view(), name='auth_token_obtain'