Disable the root API path as this confuses Swagger which then groups all endpoints into a single dropdown.

Signed-off-by: Michael Price <loneviking72@gmail.com>
This commit is contained in:
Michael Price
2018-03-13 16:26:50 -04:00
committed by Roberto Rosario
parent 764a80fab2
commit d173f9f863
2 changed files with 6 additions and 2 deletions

View File

@@ -21,7 +21,7 @@ class RESTAPIApp(MayanAppConfig):
from .urls import api_urls
settings.STRONGHOLD_PUBLIC_URLS += (r'^/%s/.+$' % self.app_url,)
menu_tools.bind_links(links=(link_api, link_api_documentation))
menu_tools.bind_links(links=(link_api_documentation,))
for app in apps.get_app_configs():
if getattr(app, 'has_rest_api', False):

View File

@@ -6,7 +6,11 @@ from .api_views import APIRoot, BrowseableObtainAuthToken
api_urls = [
url(r'^$', APIRoot.as_view(), name='api_root'),
# 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'^auth/token/obtain/$', BrowseableObtainAuthToken.as_view(),
name='auth_token_obtain'