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:
committed by
Roberto Rosario
parent
764a80fab2
commit
d173f9f863
@@ -21,7 +21,7 @@ class RESTAPIApp(MayanAppConfig):
|
|||||||
from .urls import api_urls
|
from .urls import api_urls
|
||||||
|
|
||||||
settings.STRONGHOLD_PUBLIC_URLS += (r'^/%s/.+$' % self.app_url,)
|
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():
|
for app in apps.get_app_configs():
|
||||||
if getattr(app, 'has_rest_api', False):
|
if getattr(app, 'has_rest_api', False):
|
||||||
|
|||||||
@@ -6,7 +6,11 @@ from .api_views import APIRoot, BrowseableObtainAuthToken
|
|||||||
|
|
||||||
|
|
||||||
api_urls = [
|
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(
|
url(
|
||||||
r'^auth/token/obtain/$', BrowseableObtainAuthToken.as_view(),
|
r'^auth/token/obtain/$', BrowseableObtainAuthToken.as_view(),
|
||||||
name='auth_token_obtain'
|
name='auth_token_obtain'
|
||||||
|
|||||||
Reference in New Issue
Block a user