Skip to content
Snippets Groups Projects
Commit f0fa5f71 authored by Ned Batchelder's avatar Ned Batchelder
Browse files

Enable Studio API docs in devstack

parent 135cbe76
Branches
Tags
No related merge requests found
......@@ -1173,7 +1173,7 @@ INSTALLED_APPS = [
'pipeline_mako',
# API Documentation
'rest_framework_swagger',
'drf_yasg',
'openedx.features.course_duration_limits',
'openedx.features.content_type_gating',
......
......@@ -108,6 +108,10 @@ def should_show_debug_toolbar(request):
DEBUG_TOOLBAR_MONGO_STACKTRACES = False
########################### API DOCS #################################
FEATURES['ENABLE_API_DOCS'] = True
################################ MILESTONES ################################
FEATURES['MILESTONES_APP'] = True
......
......@@ -3,7 +3,7 @@ from django.conf.urls import include, url
from django.conf.urls.static import static
from django.contrib.admin import autodiscover as django_autodiscover
from django.utils.translation import ugettext_lazy as _
from rest_framework_swagger.views import get_swagger_view
from openedx.core.openapi import schema_view
import contentstore.views
from cms.djangoapps.contentstore.views.organization import OrganizationListView
......@@ -266,7 +266,9 @@ urlpatterns += [
if settings.FEATURES.get('ENABLE_API_DOCS'):
urlpatterns += [
url(r'^api-docs/$', get_swagger_view(title='Studio API')),
url(r'^swagger(?P<format>\.json|\.yaml)$', schema_view.without_ui(cache_timeout=0), name='schema-json'),
url(r'^swagger/$', schema_view.with_ui('swagger', cache_timeout=0), name='schema-swagger-ui'),
url(r'^api-docs/$', schema_view.with_ui('swagger', cache_timeout=0)),
]
from openedx.core.djangoapps.plugins import constants as plugin_constants, plugin_urls
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment