Files
mayan-edms/mayan/apps/rest_api/urls.py
Roberto Rosario 0416ac4064 Move API documentation views API app
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2019-04-12 02:03:22 -04:00

35 lines
931 B
Python

from __future__ import unicode_literals
from django.conf.urls import include, url
from .api_views import APIRoot, BrowseableObtainAuthToken, schema_view
api_urls = [
url(r'^$', APIRoot.as_view(), name='api_root'),
url(
r'^auth/token/obtain/$', BrowseableObtainAuthToken.as_view(),
name='auth_token_obtain'
),
]
urlpatterns = [
url(
regex=r'^auth/token/obtain/$', name='auth_token_obtain',
view=BrowseableObtainAuthToken.as_view()
),
url(
regex=r'^swagger(?P<format>.json|.yaml)$', name='schema-json',
view=schema_view.without_ui(cache_timeout=None),
),
url(
regex=r'^swagger/$', name='schema-swagger-ui',
view=schema_view.with_ui('swagger', cache_timeout=None)
),
url(
regex=r'^redoc/$', name='schema-redoc',
view=schema_view.with_ui('redoc', cache_timeout=None)
),
url(r'^', include(api_urls)),
]