Re-enable the API root path and exclude it from schema introspection.
Signed-off-by: Michael Price <loneviking72@gmail.com>
This commit is contained in:
committed by
Roberto Rosario
parent
17acb444bd
commit
ff9e291cd7
@@ -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.
|
||||
|
||||
@@ -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():
|
||||
|
||||
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user